adspace
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
How to remove duplicate rows from table except one?
What is an indexed view?
How can I check that whether automatic statistic update is enabled or not?
What is a scheduled job or what is a scheduled task?
What are the different types of subquery?
What is in place upgrade in sql server?
What are the properties of the transaction?
Does view occupy space?
What are the different subsets of sql?
Can sql servers link to other servers like oracle?
What is the difference between for xml raw and for xml auto?
How do I start sql server 2017?
do you know how to configure db2 side of the application? : Sql server database administration
Why should you use or avoid select * statements?
What is sql server query analyzer?