mpradeep23 (1/27/2013)
HiCan i store the database creation script in a table call the script in stored procedure to create new database with tables and stored procedure
can any one give me idea about this
thanks
with best regards
pradeep
Yes, but you will have to use dynamic SQL to actually execute scripts stored in a table as character strings. Set a variable of datatype (n)varchar with adequate scale equal to the result of the SELECT statement that returns the query you want, then run the sp_executesql system stored procedure with that variable as the input parameter value.
Jason Wolfkill