dear fellas,
i want to insert 2 address at one time in the same table.
one is residence address and the other one is permanent address.
my question is can i have two scope_identity at once?
INSERT INTO Form_Address (add_Street, add_City, add_State, add_Zip, add_Country, add_PersonID_FK, add_Type)
VALUES (@Street, @City, @State, @Zip, @Country, @PersonID, @Type)
SET @AddressID = SCOPE_IDENTITY()
INSERT INTO Form_Address (add_Street, add_City, add_State, add_zip, add_Country, add_PersonID_FK, add_Type)
VALUES (@PermanentStreet, @PermanentCity, @PermanentState, @PermanentZip, @PermanentCountry, @PersonID, @Type)
SET @AddressID = SCOPE_IDENTITY()