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

How do I partition a table in sql server?

985


What happens if the update subquery returns no rows in ms sql server?

1073


What are the different index configurations a table can have?

899


How to apply filtering criteria at group level with the having clause in ms sql server?

944


Write a SQL query to delete a table?

1078


What is optimization and its types?

912


what is sql server? : Sql server database administration

928


What is the web service used for reporting services?

114


What is the data tier application?

169


Explain what is the main purpose of having conversation group?

880


What is a cache in ssrs?

128


Define msdb database?

973


What does nvl stand for?

905


How to create a view using data from another view?

903


What is the function of inner join?

1004