您的位置:首页 > 数据库 > SQL

如果SQL Server中存在表,如何删除表? - How to drop a table if it exists in SQL Server?

2020-07-10 18:26 603 查看

精选30+云产品,助力企业轻松上云!>>>

问题:

The table name is Scores . 表名是Scores

Is it correct to do the following? 执行以下操作是否正确?

IF EXISTS(SELECT *
FROM   dbo.Scores)
DROP TABLE dbo.Scores

解决方案:

参考一: https://stackoom.com/question/X5lr/如果SQL-Server中存在表-如何删除表
参考二: https://oldbug.net/q/X5lr/How-to-drop-a-table-if-it-exists-in-SQL-Server
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  sql server
相关文章推荐