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?

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / pradeep

One Can create Table using a variable. As #1 Answer
describe. You can only create a temp (memory) table but can
not create physical table.

It will give an error while attempting to execute : -

Create Table @VariableName( EmpID varchar(10),
EmpNm Varchar(100)
)

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL Server Interview Questions

How many triggers are possible per table?

0 Answers  


What are “lost updates”?

0 Answers  


Where are magic tables stored ? Is it in the same database where it is created ?

4 Answers  


What is shared lock?

0 Answers  


Write an SQL query if u want to select the data from one block which intern reflects in another block ? thanx,do reply

1 Answers   Covansys,


What are the restraints imposed on the table design by a merge replication?

0 Answers  


Why we use the openxml clause?

0 Answers  


How to create database with physical files specified in ms sql server?

0 Answers  


Define right outer join?

0 Answers  


1.what is stored procedure?Its significance with example? 2.Explain about index with syntax and example? plz do reply.........

2 Answers  


Explain the concept of recursive stored procedure.

0 Answers  


What is spid in sql server profiler?

0 Answers  


Categories