Is it possible to create tables in stored procedures using
a variable for the table name?
Answers were Sorted based on User's Feedback
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 |
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 |
What is the Query of getting last 10 transaction Reports (like insert, update, Delete Data from Tabele) ?
What is the difference between for trigger and after trigger?
can a table be moved to different filegroup? : Sql server administration
What is mean by clustered index and non clustered index, give syntax of creation? : sql server database administration
What is the datatype of rowid?
What are joins in sql and what are the different types of joins?
What are statistics?
Do you know sql server 2008 backup compression?
What is the difference between truncate and delete commands?
what is sql server? : Sql server database administration
What are transactions in sql?
What is a trigger and types of a trigger?