This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IF EXISTS (SELECT * FROM sys.tables WHERE schema_id = '1' AND name = 'TableA') | |
DROP TABLE TableA | |
GO | |
--條件不加schema_id | |
if exists(select * from sys.tables where name = 'TableA') drop table TableA; | |
--以下語法要SQL Server 2016之後才支援 | |
drop table if exists TableA; |
沒有留言:
張貼留言