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 are trace flags and mention a few common trace flags used with sql server?
In which tcp/ip port does sql server run? Can it be changed?
Can you explain important index characteristics?
What are the restrictions applicable while creating views? : SQL Server Architecture
Explain optimistic and pessimistic concurrency?
What does it mean to invest in the index?
Write a SQL queries on Self Join and Inner Join.
Write a program using SQL queries to find a unique entry in a table.
What is the use of =,==,=== operators?
How the authentication mode can be changed?
Explain comment on transactions?
How can I know what locks are running on which resource?
what are the important architecture components of SSRS?
Define inner join? Explain with an example?
What are cursors in ms sql server?