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
List out the differences between global and local temp tables in sql server?
Which operator do you use to return all of the rows from one query except rows are returned in a second query?
explain what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration
Write SQL queries on Self Join and Inner Join.
What is BCP? When does it used in sql server 2012?
What is normalization and what are the advantages of it?
What is the ‘fillfactor’?
What are system databases into sql server (2005/2008) : sql server database administration
If we delete pack Spec what will be the status of pack Body ?
What is auditing in sql server?
What is the difference between Triggers and Stored Procedure?
Explain the use of keyword with encryption. Create a store procedure with encryption?
What are “lock” hints?
What is coalesce in sql server?
How can you list all the columns in a database?