sql stored procedure + Return the id of the last inserted record
Posted on 2011-02-15
I have this code In my stored procedure. I want to get the value of the id for the record that was just inserted so that i can use it to insert into another table. How would i do so?
IF @ImageName <> ''
INSERT INTO Images(Image_Data, Image_Name, Content_Type)
VALUES (@ImageData, @ImageName, @ImageContentType)