Skip to content

Commit

Permalink
add fixture
Browse files Browse the repository at this point in the history
for update statement
  • Loading branch information
griffio committed Aug 16, 2023
1 parent 4e30fa5 commit d7164d3
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,12 @@ WITH deleted_test_sample AS (
RETURNING id
)
SELECT * FROM deleted_test_sample;

WITH updated_test_sample AS (
UPDATE test SET name = 'Bar'
RETURNING id
), updated_sample AS (
UPDATE sample SET val = 42 WHERE id IN (SELECT id FROM updated_test_sample)
RETURNING id
)
SELECT * FROM updated_sample;

0 comments on commit d7164d3

Please sign in to comment.