adspace


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


Please Help Members By Posting Answers For Below Questions

List out the different types of locks available in sql server?

1058


How can I check that whether automatic statistic update is enabled or not?

1121


What is the difference between for xml raw and for xml auto?

1125


What is in place upgrade in sql server?

1137


What is sql server query analyzer?

1137


What is acid mean in sql server?

1257


What are the different SQL Server Versions you have worked on?

1084


How do I find query history in sql server?

1034


How to connect php with different port numbers?

1197


How to convert numeric expression data types using the cast() function?

1157


Can we shrink data file in sql server?

1135


When should you use an instead of trigger?

1062


What are the kinds of subquery?

1118


How efficient you are in oracle and SQL server?

1269


What is self contained sub query?

1148