Pages

Ads 468x60px

Can you drop the database currently you working on? Interview questions

Hey first of all thanx for visit dotnetpoints.
One Impotent Sqlserver Interview Questions is
Can you drop the database currently you working on?
what is your answers?
yes or no?

Lets See:
Here we are going to try to drop the database with name "HH" and current we are using same "HH" database







we can't drop the database current we using. if you fire the drop query then you will got the following error message.
Msg 3702, Level 16, State 3, Line 1
Cannot drop database "YourDBName" because it is currently in use.

Now user other database and execute same query then see what happened








So the answer is No

1 comment:

  1. Are You recover Database once you have Drop the database.

    ReplyDelete