--查看所有用户表
select * from sys.tables where is_ms_shipped=0 order by name asc
--删除
use master;
go
sp_msforeachtable @command1="drop table ?"
go
博客给出两条SQL语句,一是查看所有用户表,通过'select * from sys.tables where is_ms_shipped=0 order by name asc'实现;二是删除操作,使用'sp_msforeachtable @command1=\drop table?\'语句。
--查看所有用户表
select * from sys.tables where is_ms_shipped=0 order by name asc
--删除
use master;
go
sp_msforeachtable @command1="drop table ?"
go
3504
1911

被折叠的 条评论
为什么被折叠?