Database statement removes the database


开发工具与关键技术:SQL Server 2014与SQL

作者:戴怡斌 

撰写时间:2019年6月15日

Generally, we use the database to create the database, most of them are direct database Right-click the new database, use the mouse to create, delete it, too, many people are so.

In fact, creating and deleting databases have two ways (only two known), one is right and the other way is to use the code to delete, create the database.
Here Insert Picture Description
Open your sql database, click New Query, and then enter the code that appears on the right page, enter the code page as long as we enter the two words in DROP DATABASE figure (you must use clever heads Remember these two words).

DROP DATABASE back with the name of the database you want to remove it,
Here Insert Picture Description
after you click on the Execute button on it, the figure already marked out with a red arrow,

After a general deletion, database still may be in doubt, there will be a problem, sometimes, after it is finished, the list in your database that you are still there has deleted the database (you may not think deleted, pay attention here: this is not just a page buffer over phenomenon), here we only need to right click on your database, and then refresh, so you can not see that the database has been deleted.
Here Insert Picture Description
Two kinds of refresh method, right mouse click refresh, click on the box there is also a button to refresh the effect.

Guess you like

Origin blog.csdn.net/weixin_44561520/article/details/92704931