Posts

Showing posts from 2014

Get Table Script with Constraints , Index from Sql Server

This procedure will help to get the table script with constraints , index from Sql Server...                               /*                        declare @lsobjname as varchar(200),@lsobjscript as varchar(max)                   set @lsobjname='gnmdcvsclient'                  set @lsobjscript=''                  exec UIGenTableScript @lsobjname,@lsobjscript out,' ; '                     print @lsobjscript                 */                                              CREATE Proc [dbo].[UIGenTableScript](@lsTableName as Varchar(128),@lsOutScript as Nvarchar(max) out,@lsGo as varchar(10) = 'GO') as                        declare @lsSql as Nvarchar(max),                         @Table_Schema nvarchar(256),                         @Table_Name nvarchar(256),                         @ID int ,                         @Name nvarchar(256),                         @AnsiPaddingStatus bit ,                         @Computed bit ,