如果SQL Server中存在表,如何删除表? - How to drop a table if it exists in SQL Server?
2020-07-10 18:26
603 查看
问题:
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
相关文章推荐
- DROP TABLE IF EXISTS” in Oracle and SQL Server
- “DROP TABLE IF EXISTS” in Oracle and SQL Server
- DROP TABLE IF EXISTS” in Oracle and SQL Server
- How to Implement an Automatic Sliding Window in a Partitioned Table on SQL Server 2005
- 在sqlite中,如何删除字段? how to drop a column in sqlite
- [转]如何删除放置库(How to Delete the Drop Off Library)in SharePoint 2010
- Map SQL Server Profiler EventClass ID to its name in a saved trace table
- How to delete all email in the mail server using telnet & WCScript - 如何用 Telnet 删除邮件服务器上的所有邮件
- How to Remove Table Partitioning in SQL Server
- An example to show how to make Tree structure data table in SQL server
- add column for a table if this column not exists using T-SQL in SQLServer
- How to check if a date is a valid date in Sql Server 2005
- how to judge if the temptable or normal table that you created exists
- SqlServer IF Exists([database]|[table]|[prop]) / Column([Operation])
- SQL Server Management Studio Tips : How to activate saving table modifications
- Colored SQL--How to force the AWR to capture a specified SQL even if it is not the top one
- How to monitor blocking in SQL Server 2005 and in SQL Server 2000 [ZT-MS]
- 转:How to submit rows of a repeating table in InfoPath to a web service? 如何将重复表中的记录传给Web Service ?
- [SQL Server][FILESTREAM] -- How to Detach and Attach a SQL Server FILESTREAM Enabled Database
- python: how to delete a given item if it exist in the list