Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to add options between INTO and VALUES on INSERT (likely MS SQL specific) #348

Open
dmakushin opened this issue Dec 21, 2022 · 2 comments

Comments

@dmakushin
Copy link

MS SQL has a specific way for definition of returning values. It is similar to Postgres' RETURNING ID but should be placed in the middle of the query, so suffix is not applicable.

Example (from stackoverflow):

INSERT INTO MyTable(Name, Address, PhoneNo)
OUTPUT INSERTED.ID
VALUES ('Yatrix', '1234 Address Stuff', '1112223333')
@dmakushin
Copy link
Author

What about adding of some generic method which can be used for specification of returning value for all kind of drivers?
It could be complex since the query clause which specifies it can be related to different parts of the query depending on SQL dialect.

@DrBlury
Copy link

DrBlury commented Feb 11, 2023

Any update on this? Is this planned?
I would really love to see a returning or output for the ID of the inserted dataset.

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

No branches or pull requests

2 participants