Add create_view_public.author_documents.sql
This commit is contained in:
parent
db61fbe81f
commit
aaf56456c7
20
create_view_public.author_documents.sql
Normal file
20
create_view_public.author_documents.sql
Normal file
@ -0,0 +1,20 @@
|
||||
-- View: public.author_documents
|
||||
|
||||
-- DROP VIEW public.author_documents;
|
||||
|
||||
CREATE OR REPLACE VIEW public.author_documents
|
||||
AS
|
||||
SELECT a.name AS author_name,
|
||||
a.email,
|
||||
dd.doc_id,
|
||||
dd.title,
|
||||
dd.type_name,
|
||||
dd.content,
|
||||
dd.updated_at
|
||||
FROM authors a
|
||||
JOIN document_authors da ON a.author_id = da.author_id
|
||||
JOIN document_details dd ON da.doc_id = dd.doc_id;
|
||||
|
||||
ALTER TABLE public.author_documents
|
||||
OWNER TO dbuser01;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user