摘要:
标量变量如:@var1 int = null表变量的声明DECLARE @My_Table (id int)用法插入表A数据返回ID,一般有两种方法 @@identity或者inserted.id把这个ID放入表变量@My_Tableinsert into A (Name,Gender) output inserted.id into @My_Table values ('Name','时男时女')declare @My_id int set @My_id= (select id from @My_Table) 阅读全文