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 are the different authentication modes in sql server? How can it be changed?

1137


What are different types of roles provided by ssrs?

156


explain different levels of normalization? : Sql server database administration

1049


What are logical database components? : SQL Server Architecture

1091


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

1118


What does sql server mean?

1159


what is the system function to get the current user's user id? : Sql server database administration

1068


What is system stored procedures?

1082


What stored by the model?

1139


What is data source object?

1064


can a database be shrunk to 0 bytes, if not, why? : Sql server administration

1305


What are types of storage modes? : sql server analysis services, ssas

1079


What is acid mean in sql server?

1195


What are trace files?

1004


How to create median function?

172