ADVERTISEMENT
ADVERTISEMENT

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

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.


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.

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.


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.


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.


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.

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.


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.


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.


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.


ADVERTISEMENT
ADVERTISEMENT


Comments and Discussions!



ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT

Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.