Suppose you want to select a database named ‘sampledb’ as the default database. Which of the following commands do you use?

Suppose you want to select a database named ‘sampledb’ as the default database. Which of the following commands do you use? Correct Answer USE sampledb

‘USE sampledb’ selects sampledb as the default database. Initially, ‘SELECT DATABASE();’ command displays ‘NULL’, since no database is selected by default. The other two are not valid commands.

Related Questions

Suppose you want to select a database named 'sampledb' as the default database. Which of the following commands do you use?
You want to improve the TCP transmission speed of a Windows 2000 Server computer. You also want to remove an unused registry key. You use Regedit32 to edit the registry of the Windows 2000 Server. You insert a value in the registry named TCPWindowSize, and you remove the unused key. You restart the computer, but the computer stops responding before the logon screen appears. You want to return the computer to its previous configuration. What should you do?
You are the database administrator of a SQL Server 2000 computer. The server contains your company's Accounts database. Hundreds of users access the database each day.Because you have had power interruptions in the past, you want to protect the physical integrity of the Accounts database. You do not want to slow down server operations.What should you do?