create proc proc_test@out int outputas set nocount on insert into PAS_ShowCasePhotos (sid,photo) values (1,'~~~~~') select @out=Id FROM PAS_ShowCasePhotos WHERE (Id = SCOPE_IDENTITY())go