declare @sqlcmd varchar(4000) set @sqlcmd = '' select @sqlcmd = @sqlcmd + 'delete from ' + name + char(10) from sysobjects where type = 'U' --exec (@sqlcmd) print @sqlcmd --or use 'truncate table ' command
Code
declare @sqlcmd varchar(4000)
set @sqlcmd = ''
select @sqlcmd = @sqlcmd + 'delete from ' + name + char(10) from sysobjects where type = 'U'
--exec (@sqlcmd)
print @sqlcmd
--or use 'truncate table ' command