Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to write stored procedure to update the data in 10
tables

Answer Posted / vaishali

create procedure proc_name
{
@para1 varchar(20),
@para2 varchar(20),
}
AS
Declare @sql varchar(8000)
Set @sql="update table1 set col1='value' where
col2='"+@para1+"'\n"
Set @sql=@sql+ "update table2 set col1='value' where
col2='"+@para2+"'\n"

Exec(@sql)

Is This Answer Correct ?    10 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is merge replication?

1097


Tell me what are the essential components of sql server service broker?

936


Why use “in” clause in sql server?

1064


System requirements for sql server 2005 express edition?

1001


what's new in sql server 2016?

943


How to encrypt data between dialogs?

1086


What is a field name?

953


Explain optimistic and pessimistic concurrency?

984


What is entity data services?

1044


Tell me what is fill factor?

955


How much memory that we are using in Logshipping Concept?

1781


What is inner join in sql server joins?

1022


What is the difference between a function and a trigger?

1070


Is foreign key a primary key?

1069


Define self join?

1021