How to get last inserted id on ms sql server with FireDac component?

ae1080 picture ae1080 · Apr 11, 2013 · Viewed 8.5k times · Source

with FireDac, How to get last inserted id on ms sql server? thanks

Answer

Thangamani  Palanisamy picture Thangamani Palanisamy · Apr 11, 2013

Make the that id to a identity column and then get it by Using

SELECT SCOPE_IDENTITY()

after the insert statement

Please refer the following links

http://msdn.microsoft.com/en-us/library/ms190315.aspx