How to write stored procedure to update the data in 10
tables
Answer Posted / jaipal
CREATE PROCEDURE <<procName>>
(
@param1 varchar(20),
@param2 varchar(20)
)
AS
UPDATE <<tableName1>> SET <<colName1>> = @param1 WHERE
<<colName2>> = @param2
UPDATE <<tableName1>> SET <<colName1>> = @param1 WHERE
<<colName2>> = @param2
..
..
..
..
UPDATE <<tableNameN>> SET <<colName1>> = @param1 WHERE
<<colName2>> = @param2
| Is This Answer Correct ? | 6 Yes | 7 No |
Post New Answer View All Answers
What is shrink log file?
Define ACID properties in a Database?
What is indexing explain it with an example?
What objects does the fn_my_permissions function reports on? : sql server security
What is instead of trigger sql server?
how to invoke a trigger on demand? : Sql server database administration
What is report rendering ?
Can foreign key be duplicate?
How to use clusters?
Why is replication required on the sql server?
How to declare and use cursor variables?
Explain isolation levels that sql server supports?
How to delete database objects with "drop" statements in ms sql server?
What is the maximum length of an alert name?
Can we call stored procedure in view in sql server?