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

Why should you use or avoid select * statements?

1030


Recommend an approach to ensuring that all changes in the remote databases synchronize with the SQL Azure database?

128


What security features are available for stored procedure?

1036


Tell me what is de-normalization and what are some of the examples of it?

1050


Explain the Ways to improve the performance of a sql azure database?

84


What is the New in SQL server 2008?

977


What is table-valued sub query?

970


Define Wed Edition in SQL Azure?

100


Do you know what is lock escalation?

1013


What do you mean by acid?

1001


What is normalization? Describe its different types.

1105


What is the use of keyword with encryption.

1030


Why would you call update statistics?

1018


Explain what is dbcc?

1011


How do I schedule a sql server profiler trace?

981