From 3f1a6dc23c46c9d3ada48ffa26d9f2b51f6f7a5c Mon Sep 17 00:00:00 2001 From: uPagge Date: Mon, 8 Mar 2021 18:45:21 +0300 Subject: [PATCH] create view --- .../resources/db/changelog/db.changelog-master.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/resources/db/changelog/db.changelog-master.xml b/src/main/resources/db/changelog/db.changelog-master.xml index 5ce0672..62c76ab 100644 --- a/src/main/resources/db/changelog/db.changelog-master.xml +++ b/src/main/resources/db/changelog/db.changelog-master.xml @@ -35,4 +35,15 @@ referencedTableName="person" referencedColumnNames="id" onUpdate="CASCADE"/> + + + SELECT p.id as person_id, + p.name as person_name, + b.id as book_id, + b.name as book_name + FROM person p + LEFT JOIN book b on p.id = b.author_id + + + \ No newline at end of file