IF EXISTS (SELECT SystemObjects.Name FROM SYS.OBJECTS SystemObjects WHERE SystemObjects.type = 'p' AND SystemObjects.Name = 'SelectEmployee') BEGIN DROP PROCEDURE SelectEmployee END
Following SQL statement can be used to check if table name “Employee” exists in the database and drop it if exists.
IF EXISTS (SELECT * FROM Sys.Tables WHERE name = 'Employee') BEGIN DROP TABLE Employee; END
No comments:
Post a Comment