Skip to content

Select into statement#99

Merged
not-night-but merged 3 commits into
mainfrom
feat/select-into-statement
Jul 9, 2026
Merged

Select into statement#99
not-night-but merged 3 commits into
mainfrom
feat/select-into-statement

Conversation

@not-night-but

Copy link
Copy Markdown
Contributor

Add select into as its own statement type.

Current implementation only supports psql and mssql statements like SELECT * INTO tab2 FROM tab1.

mysql has a similar statement, SELECT * FROM tab1 INTO [outfile|var] that I think we need to consider, but I feel like it might need to be a separate statement type? psql's version of this actually creates a table, whereas mysql exports to a file or creates a variable so I'm not sure how we want to classify that.

@MasterOdin

MasterOdin commented Jul 2, 2026

Copy link
Copy Markdown
Member

I think labelling it a modification for mysql is fine for all intents and purposes, and agree it should be included, though detecting it is a bit more complicated given that it follows the FROM keyword vs before. Probably best to leave it as a follow-up for now.

@not-night-but

Copy link
Copy Markdown
Contributor Author

@MasterOdin Okay done! So for mssql and psql it is specifically SELECT * INTO tab FROM tab2 that we support. Mysql technically supports the into clause before and after the FROM clause, so we allow for that only for mysql.

@not-night-but not-night-but merged commit 96eae90 into main Jul 9, 2026
9 checks passed
@not-night-but not-night-but deleted the feat/select-into-statement branch July 9, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants