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

What are the steps to insert a table?

537


What is the use of nvl work?

557


What is scrollable cursor?

534


What is extended stored procedures?

555


What is a field name?

507






What is a db view?

512


Does a full backup include transaction log?

475


What is mscorsvw.exe - process - microsoft .net framework ngen?

518


How do I view a stored procedure in sql server?

509


How to select true false based on column value in sql server?

500


What command do we use to rename a database?

607


Tell me what is normalization? Explain different forms of normalization?

539


What is the purpose of a table?

510


What are Row versions of DataRow?

598


What is 4nf in normalization form?

558