Home »
SQL »
SQL MCQs
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 –
- CONNECT
- ADD
- COMBINE
- 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?
- It is also possible to combine more than two strings into one string.
- 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.
- When the concatenated strings are stored in separate columns of a table, they are stored in the column in which they were initially stored.
- All of the above
Answer: D) All of the above
Explanation:
In case of SQL Concatenate:
- It is also possible to combine more than two strings into one string.
- 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.
- 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?
- DATE
- TIME
- MONTH
- 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?
- DATE
- DATE_FORM
- DATE_FORMAT
- 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.
- Commit
- Transaction
- Rollback
- 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?
- A transaction is marked in a table by this TCL command.
- 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.
- In order to rollback part of a table rather than the entire table, a savepoint is useful.
- All of the above
Answer: D) All of the above
Explanation:
Some of the points about Savepoint command are:
- A transaction is marked in a table by this TCL command.
- 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.
- 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.
- Mysql > Transaction ini;
- Mysql > &Savepoint;
- Mysql > START Transaction;
- 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?
- MM:HH:SS;
- SS:HH:MM;
- HH:SS:MM;
- 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?
- TIME
- TIME_FORM
- TIME_FORMAT
- 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 –
- 12-hour format
- 24-hour format
- Both A. and B.
- 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