CBSE Class 12 Informatics Practices Question 35 of 81

MySQL Functions — Question 17

Back to all questions
17
Question

Question 17

What will be returned by the given query ?

SELECT Sign(26);
  1. 1
  2. -1
  3. 0
  4. none of these
Answer

1

Reason — The SIGN() function is used to determine the sign of a given number. It returns 1 if the number is positive, -1 if the number is negative, and 0 if the number is zero. In this query, SIGN(26) represents a positive number. Therefore, it will return 1 as the output.