i want to create procedure for create table in sql server
2005

for example

create procedure create_table
@table varchar(20)
as
create @table(
id int,
name char(20)
)
but it will get error
what is solution?

Answer Posted / pradip jain

create procedure create_table
@table1 varchar(20)
as
Begin

Declare @table table
(
id int,
name char(20)
)
end

If you refer question only syntax error is there!!! as table
variable can not use using create command.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is 2nf normalization form?

776


How to rename an existing table with the "sp_rename" stored procedure in ms sql server?

722


Can you please differentiate between a primary key and a unique key?

723


What is nolock?

747


What is the osql utility?

724






Can binary strings be converted into numeric or float data types?

744


Is sql server implemented as a service or an application? : Sql server database administration

700


What are different types of subquery?

908


How to insert data into an existing table?

715


Do you have any idea about the tcl commands?

713


Explain magic tables in sql server?

723


Explain features and concepts of analysis services?

673


How will you hide an attribute? : sql server analysis services, ssas

709


what is blocking? : Sql server database administration

714


What is outer join in sql server joins?

748