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 |
How to add an address record into adventureworkslt?
How raid can influence database performance?
What is partitioned view?
What is row_number function?
How to check table values in sql server?
What are the types of table?
How does a profiler work?
4 Please write a querry to find repeated numbers in the following table. Table Name: Table1 Field1 10 15 20 15 10
How do I edit a procedure in sql server?
What are the encryption mechanisms in sql server?
What is abstracting periodical?
Explain what is public role in sql server?