Generate table definitions using TSQLWe are very much familiar with a system stored procedure called sphelptext, which gets us the object definition on query window itself, but that sp is limited to procedures, functions, triggers, computed columns, views etc.So far there are no system procedures available in SQL Server to generate table definitions using TSQL including constraints, defaults and indices.The only way to get the table definition is using SSMS GUI either by right clicking on the table or using Generate Scripts option under the database context.Dont you like to have a stored procedure handy like sphelptext to generate table definitions for you from query window without switching over to the SSMS object explorer
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
November 2017
Categories |