Wednesday, January 6, 2010

Droping(Deleting) a database from a SQL Server

Syntax:
drop database database_name;

Example:
drop database student;

Note that you are not currently work on the database which you going to drop.
Change your current working database to anyother system database such as master,northwind,etc.,

If you want to delete more than one db seperate with commas(,).

Syntax:

drop database database_name1,database_name2,..n;

Example:
drop database staff,department;

No comments:

Post a Comment