I'm writing a database in Microsoft Access to save the client from having to buy SQL Server. How do you get the primary key of the row that I just inserted? In SQL Server, it's
INSERT INTO TABLE(FIELDLIST) VALUES(VALUELIST)
SELECT * FROM TABLE WHERE PrimaryKeyID = SCOPE_IDENTITY()
Try:
SELECT @@Identity
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With