Explore topic-wise MCQs in Structured Query Language (SQL).

This section includes 15 Mcqs, each offering curated multiple-choice questions to sharpen your Structured Query Language (SQL) knowledge and support exam preparation. Choose a topic below to get started.

1.

In UNIX, the name of the option file is __________

A. .my.cnf
B. .my.ini
C. .my.opt
D. .my.opc
Answer» B. .my.ini
2.

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.

A. True
B. False
Answer» B. False
3.

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

A. map
B. direct
C. label
D. alias
Answer» E.
4.

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

A. mysql exec.sql > sampdb
B. mysql sampdb < exec.sql
C. mysql exec.sql
D. mysql exec
Answer» C. mysql exec.sql
5.

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

A. .mysql_queries
B. .queries
C. .mysql_history
D. .history
Answer» D. .history
6.

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.?$

A. True
B. False
Answer» B. False
7.

In_UNIX,_the_name_of_the_option_file_is___________$

A. .my.cnf
B. .my.ini
C. .my.opt
D. .my.opc
Answer» B. .my.ini
8.

The clause that enables mapping a short command to a long command is _________?

A. map
B. direct
C. label
D. alias
Answer» E.
9.

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

A. -t
B. -tf
C. -p
D. -pf
Answer» B. -tf
10.

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

A. mysql exec.sql > sampdb
B. mysql sampdb < exec.sql
C. mysql exec.sql
D. mysql exec
Answer» C. mysql exec.sql
11.

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

A. chmod +e run_me.sh
B. chmod +a run_me.sh
C. chmod +y run_me.sh
D. chmod +x run_me.sh
Answer» E.
12.

MySQL can be used to execute script files.

A. True
B. False
Answer» B. False
13.

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

A. .mysql_queries
B. .queries
C. .mysql_history
D. .history
Answer» D. .history
14.

What does Control-_ do in MySQL input editor?

A. copies to clipboard
B. pastes from clipboard
C. undoes last change
D. deletes the current line
Answer» D. deletes the current line
15.

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

A. Ctrl-A
B. Ctrl-E
C. Ctrl-D
D. Esc-a
Answer» B. Ctrl-E