Ramon Quintana

Ramon Quintana

  • NA
  • 404
  • 65.3k

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

Sep 20 2018 11:04 AM
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)