2
Answers

How can i INSERT a @@rowcount in a table camp

Hi, I have a @@rowcount value catch from a Delete sentence, i need to INSERT that value in a table varchar column.
 
I WROTE this Query:
 
declare @delete int
delete from TableName1
select @delete = @@rowcount
 
insert into TableName2 (nom_tab, Reg_deleted)
values ('TableName1','@@rowcount');
 
BUT:
 
it only insert the WORD  "@@rowcount" and NOT THE VALUE
 
Answers (2)