squirrel
squirrel copied to clipboard
No way to add options between INTO and VALUES on INSERT (likely MS SQL specific)
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')
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.
Any update on this? Is this planned? I would really love to see a returning or output for the ID of the inserted dataset.