How to write stored procedure to update the data in 10
tables
Answer Posted / vaishali
create procedure proc_name
{
@para1 varchar(20),
@para2 varchar(20),
}
AS
Declare @sql varchar(8000)
Set @sql="update table1 set col1='value' where
col2='"+@para1+"'\n"
Set @sql=@sql+ "update table2 set col1='value' where
col2='"+@para2+"'\n"
Exec(@sql)
| Is This Answer Correct ? | 10 Yes | 11 No |
Post New Answer View All Answers
What is merge replication?
Tell me what are the essential components of sql server service broker?
Why use “in” clause in sql server?
System requirements for sql server 2005 express edition?
what's new in sql server 2016?
How to encrypt data between dialogs?
What is a field name?
Explain optimistic and pessimistic concurrency?
What is entity data services?
Tell me what is fill factor?
How much memory that we are using in Logshipping Concept?
What is inner join in sql server joins?
What is the difference between a function and a trigger?
Is foreign key a primary key?
Define self join?