Is it possible to create tables in stored procedures using
a variable for the table name?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to update a field in SQL after ALTERING a row?

877


Is null vs coalesce?

642


How to bind a view to the schema of the underlying tables?

754


What is surrogate key? : sql server analysis services, ssas

862


What is the correct order of the logical query processing phases?

688






What is difference between views and stored procedures?

710


How to stop log file growing too big?

746


how to overcome kernel isssues

1349


What is isolation levels?

752


What are user-defined functions (udfs) in sql server?

731


What are different replication agents and what's their purpose? : sql server replication

743


How you can minimize the deadlock situation?

730


What is the architecture of ms sql reporting service?

702


What are the pros and cons of putting a scalar function in a queries select list or in the where clause?

948


What is the default schema of your login session in ms sql server?

740