怎样能在插入记录的时候做到IDD字段插入的值是ID的值?我第一想到的是:触发器 insert into tablea(a,b) values('a','b') declare thisid int thisid =select @@indentity; update tablea set idd=thisid where id=thisid C# code:
insert into TableName select IDENT_CURRENT('TableName')+1
SQL code: insert into TableName select IDENT_CURRENT('TableName')+1