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

Introduction of rollup clause using sum and group by clause?

0 Answers  


What are the operating modes in which database mirroring runs?

0 Answers  


What are three major types of constraints?

0 Answers  


Hi..here i would like to know the Backup and Restore models?

2 Answers   HCL,


How many files can a database contain in sql server?how many types of data files exists in sql server? How many of those files can exist for a single database?

0 Answers  


How to verify a user name with sqlcmd tool?

0 Answers  


What is the difference between push and pull subscription? : sql server replication

0 Answers  


How do you create a data source?

0 Answers  


How to count the number of duplicate items in a table?

3 Answers  


what is the output for this query select * from employee where 1=1;

4 Answers  


How efficient you are in oracle and SQL server?

0 Answers   CGI,


What are some of the pros and cons of not dropping the sql server builtinadministrators group? : sql server security

0 Answers  


Categories