Thursday, January 15, 2015

Drop Tables Script for Non Inter-Dependant Tables

use [target_database]

select 'drop table [' + name + ']'

from sys.objects

where type = 'U'

OR

EXEC SP_MSFOREACHTABLE 'drop table ?'

No comments:

Post a Comment

comment: