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
Why should you use or avoid select * statements?
Recommend an approach to ensuring that all changes in the remote databases synchronize with the SQL Azure database?
What security features are available for stored procedure?
Tell me what is de-normalization and what are some of the examples of it?
Explain the Ways to improve the performance of a sql azure database?
What is the New in SQL server 2008?
What is table-valued sub query?
Define Wed Edition in SQL Azure?
Do you know what is lock escalation?
What do you mean by acid?
What is normalization? Describe its different types.
What is the use of keyword with encryption.
Why would you call update statistics?
Explain what is dbcc?
How do I schedule a sql server profiler trace?