Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2008
    Posts
    26

    Unanswered: OFF keyword in SQL Oracle

    Hi Guys,

    I was looking at a view, and found somewhere in the where/select clause the "off" keyword is being used, i tried to google it, could not find anything.

    It goes this way

    select off.col1, col2 ...

    select col1,col2 from .. where off.col3 ...

    Anyone has any idea what the off keyword represents

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    As far as I can tell, it is not a keyword but a table alias.
    Code:
    SQL> select off.deptno, off.dname
      2  from dept off
      3  where off.loc = 'BOSTON';
    
        DEPTNO DNAME
    ---------- --------------
            40 OPERATIONS
    
    SQL>

  3. #3
    Join Date
    Nov 2008
    Posts
    26
    Quote Originally Posted by Littlefoot
    As far as I can tell, it is not a keyword but a table alias.
    Code:
    SQL> select off.deptno, off.dname
      2  from dept off
      3  where off.loc = 'BOSTON';
    
        DEPTNO DNAME
    ---------- --------------
            40 OPERATIONS
    
    SQL>
    oh yeah, you are right, its an alias, i dont know why this guys uses such an alias, in TOAD, the "OFF" word was highlighted in blue, so i was thinking it was a keyword, thanks for the help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •