mysql
drop table if exists myTablemssqlserver
方式一
if exists(select * from sys.objects where object_id = OBJECT_ID('myTable') and type in ('U'))
drop table myTable;方式二
if exists(select * from INFORMATION_SCHEMA.TABLES where TABLE_NAME = 'myTable')
drop table myTable;
本文介绍了在MySQL和MSSQLServer中如何使用SQL语句来安全地删除名为myTable的数据表。针对不同的数据库管理系统,提供了两种不同的实现方式。
1552

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



