IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'users') DROP TABLE users;
MSSQL: drop table if exists
Page 1 of 10 Replies - 1537 Views - Last Post: 04 November 2007 - 08:54 PM
#1
MSSQL: drop table if exists
Posted 04 November 2007 - 08:54 PM
Description: Use this query to drop the table 'users' from an MS SQL database.MSSQL doesn't support the "DROP TABLE IF EXISTS [table]" syntax. Here's how to do the same thing under MSSQL.
Page 1 of 1