logo

CuriousTab

CuriousTab

Discussion


Home Interview Technology Comments

  • Question
  • What are Number Functions in SQL?


  • Correct Answer
  • - ABS(number) Returns the absolute positive value of an expression Syntax: ABS(expression) Example: SELECT ABS(-10), ABS(00), ABS(10) Output: 10 0 10 - CEIL(number) Returns the smallest integer greater than, or equal to, the specified numeric expression Syntax: CEILING(expression) Example: SELECT CEILING($22345), CEILING($-22345), CEILING($00) Output: 22400 -22300 000 - FLOOR(number) Returns the largest integer less than, or equal to, the specified numeric expression Syntax: FLOOR(expression) Example: SELECT FLOOR($22345), CEILING($-22345), CEILING($00) Output: 22300 -22400 000 - MOD(number, divisor) Returns the remainder of the division from 2 integer values Syntax: MOD(dividend, divisor) Example: SELECT MOD(20,3) Output: 2 - POWER(number, power) Returns the exponential value for the numeric expression Syntax: POWER(number, power) Example: SELECT POWER(20, 30) Output: 80 - SIGN(number) Returns the sign ie positive or negative value for the numeric expression It returns -1 for negative expressions, a value of 0 for zero Syntax: SIGN(number) Example: SELECT SIGN(4) Output: 1 - ROUND(number, precision) Returns the numeric value rounded off to the next value specified Syntax: ROUND(number, number of places) Example: SELECT ROUND(13456, 2) - SQRT(number) Returns the square root value of the expression Syntax: SQRT(number) Example: SELECT SQRT(40) Output: 20 - TRUNC(number, precision) Returns a numeric value that truncate to the specific places Syntax: TRUNCATE(number,places) Example: SELECT TRUNCATE(13456, 2) Output: 134 


  • Technology problems


    Search Results


    • 1. What are aggregate functions in SQL? What are those functions?
    • Discuss
    • 2. Explain Row level and statement level trigger.
    • Discuss
    • 3. Explain the difference between trigger and stored procedure.
    • Discuss
    • 4. What do you mean by Redo Log file mirroring ?
    • Discuss
    • 5. What are the varoius components of physical database structure of Oracle database?
    • Discuss
    • 6. What are the basic SQL*Plus commands?
    • Discuss
    • 7. What is AFIEDT.BUF?
    • Discuss
    • 8. How to Add a new column to an existing table?
    • Discuss
    • 9. How to recover a dropped table?
    • Discuss
    • 10. What are the types of constraints avaialable in oracle?
    • Discuss


    Comments

    There are no comments.

Enter a new Comment