다음 삽입할 id를 가져오십시오

618 단어
 
  
declare @Table_name varchar(60)
set @Table_name = 'Pay_inputpay';
Select so.name Table_name, --
sc.name Iden_Column_name, --
ident_current(so.name) curr_value, --
ident_incr(so.name) incr_value, --
ident_seed(so.name) seed_value --
from sysobjects so
Inner Join syscolumns sc
on so.id = sc.id
and columnproperty(sc.id, sc.name, 'IsIdentity') = 1
Where upper(so.name) = upper(@Table_name)
--@Table_name curr_value id

좋은 웹페이지 즐겨찾기