1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

SQL Expression

Discussion in 'SQL PL/SQL' started by ygsunilkumar, May 4, 2009.

  1. ygsunilkumar

    ygsunilkumar Active Member

    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    80
    Single-Row Functions accepts one or more arguments and return one value for each row returned by the query.
    Any argument can be one of the following:
    a. user-supplied constant
    b. variable value
    c. column name
    d. expression

    From the above definition, I would like to know what is the "expression". If example is provided, it will be easy to understand. Thanks.
     
  2. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India
    For example,

    Code (SQL):

    SQL> SELECT TO_CHAR(TRUNC(SYSDATE,'MONTH')-1,'DAY') DAY FROM DUAL;

    DAY
    ---------
    THURSDAY
     
    Here TO_CHAR is single row function.
    TRUNC(SYSDATE,'MONTH')-1 is expression , as it combines one or more values operator and even uses One function.

    You can refer the following link for SQL Expressions

    SQL Expressions