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's sql server? : Sql server database administration
What is the standby server?
What is referential integrity and how is it achieved?
What is stored procedure in SQL..??
Explain the first normal form(1nf)?
what is memory-optimized nonclustered indexes
hi. suppose one person goal is strong knowledge on SQL.... suggest me ...if he learns SQL SERVER or ORACLE? which is best?
7 Answers Google, TCS, Unisys,
How can you see what type of locks used?
How can you list all the columns in a database?
explain different types of backups avaialabe in sql server? : Sql server database administration
What is blocking and how would you troubleshoot it? : sql server database administration
Benefits of Stored Procedures?