赞
踩
mysql
drop table if exists myTable
mssqlserver
方式一
- IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'myTable') AND type in (N'U'))
- DROP TABLE myTable
方式二
if exists(select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'myTable')
drop table myTable;
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。