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 factless fact table? : sql server analysis services, ssas
How to assign null values to variables or columns?
What are the differences between char and varchar in ms sql server?
What is the security principal at the database level that represents your session?
List some case manipulation functions in sql?
What are the different types of columns types constraints in the sql server?
Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you
What is the difference between drop table and truncate table?
What is shared lock?
How many types of keys are there?
what's the information that can be stored inside a bit column? : Sql server database administration
What happens if strings are casted into wrong code pages in ms sql server?
Explain powershell included in sql server 2008?
what method you can use to reduce the overhead of Reporting Services data sources?
what are isolation levels? : Sql server database administration