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 different authentication modes in sql server? How can it be changed?
What are different types of roles provided by ssrs?
explain different levels of normalization? : Sql server database administration
What are logical database components? : SQL Server Architecture
How to convert numeric expression data types using the cast() function?
What does sql server mean?
what is the system function to get the current user's user id? : Sql server database administration
What is system stored procedures?
What stored by the model?
What is data source object?
can a database be shrunk to 0 bytes, if not, why? : Sql server administration
What are types of storage modes? : sql server analysis services, ssas
What is acid mean in sql server?
What are trace files?
How to create median function?