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 many triggers are possible per table?
What are “lost updates”?
Where are magic tables stored ? Is it in the same database where it is created ?
What is shared lock?
Write an SQL query if u want to select the data from one block which intern reflects in another block ? thanx,do reply
What are the restraints imposed on the table design by a merge replication?
Why we use the openxml clause?
How to create database with physical files specified in ms sql server?
Define right outer join?
1.what is stored procedure?Its significance with example? 2.Explain about index with syntax and example? plz do reply.........
Explain the concept of recursive stored procedure.
What is spid in sql server profiler?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)