sql server - Copy Each Identity Of Inserted Records -
i have 2 table first:
table: tbl#sell sellid clientid productid 1 3 3 5 4 6
second:
table: tbl#sell2 sellid clientid productid
now want copy every record of first table second one. "sellid" column in second table (sell2.sellid) auto increment (identity).
for insert tbl#sell2.sellid set new identity , must store identity in tbl#sell1.sellid
clear?
solution? , plz. thanks
i want store tbl#sell2.sellid in tbl#sell.sellid
you can use triggers :
http://msdn.microsoft.com/en-us/magazine/cc164047.aspx
http://msdn.microsoft.com/en-us/library/aa258254(v=sql.80).aspx
Comments
Post a Comment