InterviewSolution
Saved Bookmarks
| 1. |
Suppose you want to select a database named ‘sampledb’ as the default database. Which of the following commands do you use?(a) SELECT DATABASE()(b) SELECT DATABASE sampledb(c) USE DATABASE sampledb(d) USE sampledbThis question was posed to me in exam.Asked question is from MySQL Setup topic in portion General MySQL Use of MySQL |
|
Answer» RIGHT choice is (d) USE sampledb Easiest explanation: ‘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. |
|