MCQ | SQL – Scalar Functions

SQL Scalar Functions MCQ: This section contains the Multiple-Choice Questions & Answers on SQL Scalar Functions.
Submitted by Anushree Goswami, on October 24, 2021

SQL Scalar Functions MCQs

1. Output returned by the Scalar functions is/are -

  1. Single Value
  2. Multiple Value
  3. Two Values
  4. None of the above

Answer: A) Single Value

Explanation:

The output returned by the Scalar functions is Single Value.

Discuss this Question


2. The scalar functions operate on each record ____ in SQL.

  1. Dependently
  2. Independently
  3. Interdependently
  4. Intradependently

Answer: B) Independently

Explanation:

The scalar functions operate on each record independently in SQL.

Discuss this Question


3. Which of the following is/are Scalar function(s)?

  1. UCASE()
  2. MID()
  3. ROUND()
  4. All of the above

Answer: D) All of the above

Explanation:

The commonly used Scalar functions are -

  • UCASE()
  • MID()
  • ROUND()
  • FORMAT()
  • LCASE()
  • LENGTH()
  • NOW()

Discuss this Question


4. What is the functionality of UCASE function?

  1. To change the case of the string to lowercase characters.
  2. To change the case of the string to uppercase characters.
  3. To change the case of the string to numeric characters.
  4. To change the case of the string to symbolic characters.

Answer: B) To change the case of the string to uppercase characters

Explanation:

UCASE function is used to change the case of the string to uppercase characters.

Discuss this Question


5. Full form of LCASE is -

  1. Low case
  2. Letter case
  3. Light case
  4. Lower case

Answer: D) Lower case

Explanation:

Full form of LCASE is Lower case.

Discuss this Question


6. Which function is used to extract substrings from the column of the table –

  1. ROUND()
  2. MID()
  3. FORMAT()
  4. NOW()

Answer: B) MID()

Explanation:

The MID() function is used to extract substrings from the column of the table.

Discuss this Question


7. NOW function is used to return the current –

  1. Time
  2. Date
  3. Date & Time
  4. Day

Answer: C) Date & Time

Explanation:

NOW function is used to return the current Date & Time of the system.

Discuss this Question


8. In order to format, how the column should be displayed, which function is used?

  1. FORM()
  2. DISPLAY()
  3. COL()
  4. FORMAT()

Answer: D) FORMAT()

Explanation:

In order to format, how the column should be displayed, the FORMAT function is used.

Discuss this Question


9. ROUND function consists of ___ parameters?

  1. One
  2. Two
  3. Three
  4. Four

Answer: B) Two

Explanation:

The ROUND() function consists of Two Parameters and is used with the SELECT query in order to print the formatted value.

Discuss this Question


10. Choose the correct syntax of NOW function?

  1. SELECT ()NOW;
  2. NOW() SELECT;
  3. SELECT NOW();
  4. SELECT OWN();

Answer: C) SELECT NOW();

Explanation:

SELECT NOW(); is the correct syntax of NOW function.

Discuss this Question





Comments and Discussions!

Load comments ↻





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