|
|
Browse by Tags
All Tags » sql server 2005
-
To drop all tables in a SQL Server 2005 database use :
sp_MSforeachtable command1 [,replacechar] [, command2] [,command3] [,whereand] [,precommand] [,postcommand
Example : exec sp_MSforeachtable "DROP TABLE ? PRINT '? dropped' "
This is the same in both SQL Server 2000 and SQL Server 2005 You have to execute the code a ...
-
In SQL SERVER 2005, perhaps this will work :-- variable to object namedeclare @name varchar(100)@name varchar(100) -- variable to hold object typedeclare @xtype char(1)@xtype char(1) -- variable to hold sql stringdeclare @sqlstring nvarchar(1000)@sqlstring nvarchar(1000) declare SPViews_cursor cursor forSPViews_cursor cursor for /**
SELECT ...
|
|
|