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
Explain index in sql server?
How do use Having,Group by,Group function in SQL?
on line cluster can we make if yes tell me the procedure
Can you explain about buffer cash and log cache in sql server?
What is the difference between functions and stored procedures?
what is dbcc? : Sql server database administration
What is cursors? And what are the different types of cursor?
How you would rewrite the sql query to return the customerid sorted numerically?
In which tcp/ip port does sql server run? Can it be changed?
How to change server name in sql server?
Can a database be shrunk to 0 bytes, if not, why?
What is t-sql script to take database offline – take database online.
What is subreport?
What is the purpose of the tempdb database?
What is the contrast amongst drop and truncate?