-
Suppose you want to select a database named ‘sampledb’ as the default database. Which of the following commands do you use?
-
- USE DATABASE sampledb
- USE sampledb
- SELECT DATABASE sampledb
- SELECT DATABASE()
- None of these
Correct Option: B
‘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.