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
What is acid properties?
Why use view instead of a table?
What is a collation in ms sql server?
Explain go command in sql server?
How to create percentile function?
How can we migrate from SQL server to SQL Azure?
How to execute the cursor queries with "open" statements?
What is the difference between a "where" clause and a "having" clause?
How to create a stored procedure with a statement block in ms sql server?
What is similarity and difference between truncate and delete in sql?
Name some of the open source software that you can use in alternative to SSR?
What is scan table/view and seek table/view when its occurs? : sql server database administration
Please differentiate between a local and a global temporary table?
Is it true that rules do not apply to data already existing in a database at the time the rule is created?
What are the features of Embedded SQL