Skip to content

Commit

Permalink
Allow insert statements to include record variables
Browse files Browse the repository at this point in the history
  • Loading branch information
developandroidninja committed Oct 29, 2020
1 parent e2929b2 commit 89f0599
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sql/plsql/PlSqlParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -3613,7 +3613,7 @@ insert_into_clause
;

values_clause
: VALUES '(' expressions? ')'
: VALUES (REGULAR_ID | '(' expressions ')')
;

merge_statement
Expand Down
6 changes: 6 additions & 0 deletions sql/plsql/examples/insert_statement.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
DECLARE
V_RECORD EVENT%ROWTYPE;
BEGIN
SELECT * INTO V_RECORD FROM EVENT WHERE ROWNUM=1;
INSERT INTO TMP_EVENT VALUES V_RECORD;
END;

0 comments on commit 89f0599

Please sign in to comment.