2-8 Delete database

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;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325903892&siteId=291194637