adplus-dvertising
frame-decoration

Question

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 sampledb

Posted under MySQL Database

Answer: (d).USE sampledb

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

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

Similar Questions

Discover Related MCQs

Q. To see the table structure, which of the following SQL commands is issued?

Q. SHOW DATABASES lists the databases in the server to which you are connected.

Q. The command to move the cursor to the beginning of line in MySQL input editor is?

Q. What does Control-_ do in MySQL input editor?

Q. On UNIX, statements entered in ‘MySQL’ are saved in which file?

Q. MySQL can be used to execute script files.

Q. Suppose run_me.sh is a script file. Which command is used to make it executable?

Q. To execute the contents of a query file ‘exec.sql’ by feeding it to mysql, which command is used?

Q. Which option prints output in table-format when MySQL is run interactively?

Q. The clause that enables mapping a short command to a long command is __________

Q. The connection parameters for setting up MySQL can be stored in an option file to save typing the names every time a connection is established.

Q. In UNIX, the name of the option file is __________

Q. Which statement upgrades the database directory name encoding?

Q. The statement that alters an existing event to have the given definition is _____________

Q. What sets up an association between one or more MyISAM tables and the named key cache?

Q. Which statement can produce the same output as ‘SHOW COLUMNS’?

Q. Converting a client/server application to embedded server is difficult.

Q. The option that executes all SQL statements in a SQL script irrespective of the number of errors is _______________

Q. The clause that is used to display information that matches a given pattern is _____________

Q. The header that should be included first is ________________