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...

Is it possible to create tables in stored procedures using
a variable for the table name?

Answer Posted / skybeaver

create proc ShowMeHow
as

declare @Cities table(
AirportCode char(3) not null primary key,
CityName varchar(255) not null
)

insert into @Cities values('LAX', 'Los Angeles')
insert into @Cities values('ORD', 'Chicago')

select * from @Cities
go

Is This Answer Correct ?    7 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the maximum size of column in sql server?

938


How to deploy the Report?

140


What are the different Topologies in which Replication can be configured?

1235


What is transact-sql language?

1129


How do I find the query plan in sql server?

1012


How to scale out a federation by Sql statement?

118


How do I view a script in sql server?

1079


Explain different types of Normalization.

1893


If you are given access to a SQL Server, how do you find if the SQL Instance is a named instance or a default instance?

1170


Explain an incremental backup?

1049


Explain how does the report manager work in ssrs?

997


What happens when converting big values to integers?

1053


What are the advantages of paper records?

1010


What do you mean by SQL injection attack?

1123


What new data source types were added in ssrs 2014?

169