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

What is bookmark link in ssrs?

153


What is a filestream?

774


What is store procedure? When do you use?

725


What is the fastest way to permanently delete a 1 million row table named customers?

900


What is federation member?

111


How do you rename a table in sql server?

687


What are three ways you can use an identity value inside a trigger? Why would you prefer one way over another?

786


How to loop through returning rows?

774


What is the difference between resultset and resultsetmetadata?

744


How many types of database relationship in sql server?

785


What are the differences between “row_number()”, “rank()” and “dense_rank()”?

759


write an SQL query to list the employees who joined in the month of January?

1418


Explain how dts is used to extract, transform and consolidate data?

805


What is an index in sql?

777


Can we perform backup restore operation on tempdb? : sql server database administration

799