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
Can you pass expressions to function parameters?
What is cached report?
How to generate create table script on an existing table in ms sql server?
Explain what are the database objects? : SQL Server Architecture
What is @@error in sql?
How to delete duplicate records based on single column from a table?
Explain boyce and codd normal form(bcnf)?
Do you know what is user defined datatypes and when you should go for them?
Tell me what is the stuff and how does it differ from the replace function?
What is the difference between index seek vs. Index scan?
Differentiate between a having clause and a where clause.
What are the default system databases in sql server 2000?
How to loop through result set objects using odbc_fetch_row()?
You have to store user responses of ‘yes’ and ‘no’ what kind of data type is best suited for this task?
What is spid in sql server profiler?