Drop the database using a view:
Object Explorer - "Right click on the database to be deleted - "Delete -" as shown below:
(Picture 1)
Check the following radio buttons:
(Picture 2) Click to delete:
At this point, the database deletion is completed;
Drop the database using the SQL statement:
Code perfect:
IF EXISTS(SELECT*FROM sysdatabases WHERE name=='E_Market')
DROP ATATBASE E_Market
illustrate:
IF EXISTS(SELECT*FROM sysdatabases WHERE name=='E_Market') This code can also be placed before the creation code;