MCQ | SQL – Concatenate, Savepoint, TIME

SQL Concatenate, Savepoint, TIME MCQ: This section contains the Multiple-Choice Questions & Answers on SQL Concatenate, Savepoint, TIME.
Submitted by Anushree Goswami, on October 31, 2021

SQL Concatenate, Savepoint, and TIME MCQs

1. To connect strings, which function is used –

  1. CONNECT
  2. ADD
  3. COMBINE
  4. CONCAT

Answer: D) CONCAT

Explanation:

To connect strings, CONCAT function is used.

Discuss this Question


2. Which of the following is TRUE about SQL Concatenate?

  1. It is also possible to combine more than two strings into one string.
  2. Two columns of the table may be used to store the strings that are to be combined, or they may just be stored individually without being stored into the table.
  3. When the concatenated strings are stored in separate columns of a table, they are stored in the column in which they were initially stored.
  4. All of the above

Answer: D) All of the above

Explanation:

In case of SQL Concatenate:

  1. It is also possible to combine more than two strings into one string.
  2. Two columns of the table may be used to store the strings that are to be combined, or they may just be stored individually without being stored into the table.
  3. When the concatenated strings are stored in separate columns of a table, they are stored in the column in which they were initially stored.

Discuss this Question


3. Which function is used to obtain the month from the entire data stored in a table's column?

  1. DATE
  2. TIME
  3. MONTH
  4. DATE & TIME

Answer: C) MONTH

Explanation:

MONTH function is used to obtain the month from the entire data stored in a table's column.

Discuss this Question


4. In more readable form, you can retrieve the date values, using ______ function?

  1. DATE
  2. DATE_FORM
  3. DATE_FORMAT
  4. DATE_VALUE

Answer: C) DATE_FORMAT

Explanation:

In more readable form, you can retrieve the date values, using DATE_FORMAT function.

Discuss this Question


5. Savepoint command is used with _____ command.

  1. Commit
  2. Transaction
  3. Rollback
  4. None of the above

Answer: C) Rollback

Explanation:

Savepoint command is used with Rollback command.

Discuss this Question


6. Which of the following is TRUE about Savepoint command?

  1. A transaction is marked in a table by this TCL command.
  2. Imagine that you are making a long table, and you want to roll back only to a specific point in the table. You can do this with the savepoint.
  3. In order to rollback part of a table rather than the entire table, a savepoint is useful.
  4. All of the above

Answer: D) All of the above

Explanation:

Some of the points about Savepoint command are:

  1. A transaction is marked in a table by this TCL command.
  2. Imagine that you are making a long table, and you want to roll back only to a specific point in the table. You can do this with the savepoint.
  3. In order to rollback part of a table rather than the entire table, a savepoint is useful.

Discuss this Question


7. Select the correct syntax for Savepoint.

  1. Mysql > Transaction ini;
  2. Mysql > &Savepoint;
  3. Mysql > START Transaction;
  4. Mysql > Savepoint ini;

Answer: D) Mysql > Savepoint ini;

Explanation:

Mysql > Savepoint ini; is the correct syntax for Savepoint.

Discuss this Question


8. By default, TIME data type stores time in which format?

  1. MM:HH:SS;
  2. SS:HH:MM;
  3. HH:SS:MM;
  4. HH:MM:SS;

Answer: D) HH:MM:SS;

Explanation:

By default, TIME data type stores time in HH:MM:SS format.

Discuss this Question


9. It is possible to retrieve time in a more readable format, using which function?

  1. TIME
  2. TIME_FORM
  3. TIME_FORMAT
  4. TIME & DATE

Answer: C) TIME_FORMAT

Explanation:

It is possible to retrieve time in a more readable format, using TIME_FORMAT() function.

Discuss this Question


10. Using TIME_FORMAT() function, time can be retrieved in –

  1. 12-hour format
  2. 24-hour format
  3. Both A. and B.
  4. None of the above

Answer: C) Both A. and B.

Explanation:

Using TIME_FORMAT() function, time can be retrieved in 12-hour and 24-hour formats.

Discuss this Question





Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.