ADVERTISEMENT
ADVERTISEMENT

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

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.


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.


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()

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.


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.


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.


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.


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.


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.


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.


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.