如果存在这个表,则删除这个表的sql

mysql:
drop table if exists address_book

sqlserver2005:
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[表名]') AND type in (N'U'))
DROP TABLE [dbo].[表名]

posted @ 2020-03-02 17:54  KJXY  阅读(1682)  评论(0编辑  收藏  举报