if exists ( select * from INFORMATION_SCHEMA.tables where table_name = '表名') --判断表是否存在
drop table [dbo].[表名] --删除表定义及该表的所有数据、索引、触发器、约束和权限规范
go
判断数据库表是否存在
最新推荐文章于 2025-02-24 17:17:31 发布
if exists ( select * from INFORMATION_SCHEMA.tables where table_name = '表名') --判断表是否存在
drop table [dbo].[表名] --删除表定义及该表的所有数据、索引、触发器、约束和权限规范
go