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 are the pre-defined functions in the sql server?
How to drop an existing table?
How do I schedule a sql server profiler trace?
How to access the deleted record of an event?
Why we use the openxml clause?
what is the difference between writing data to mirrored drives versus raid5 drives. : Sql server administration
What are the new features are introduced in sql server 2012 reporting services?
How to get a list of columns using the "sys.columns" view in ms sql server?
What is difference between joins and subqueries?
how would you store your query in an SSRS report or a Database server?
Explain primary key in sql server?
Explain about analysis services?
Mention the differences between sql server and mysql.
What is constraints and its types?
What is the maximum size of a dimension? : sql server analysis services, ssas