Or better yet, is there a way to retrieve the DDL that was used to create a table using a T-SQL query?
Thanks in advance,
-Preston M. Price
Perhaps something like this:
SELECT text
FROM sys.syscomments
WHERE id = object_id( 'MyStoredProcedure' )
|||There is no way to query DDL from the database (beside the Routine_definition your get from INFORMATION_SCHEMA.Routines table or the sysobejcts as Arnie pointed out), you will have to either write your own way to do this or you can use API of SMO to do the stuff with the scripter object.
Jens K. Suessmeyer.
http://www.sqlserver2005.de
No comments:
Post a Comment