Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2003
    Posts
    19

    Reserved Word as column name

    Dear all,

    I need to select from a table with a column name "OPTION" (which is a reserved word).

    Would greatly appreciate any quick workaround without having to change the column name or creating a temp table?

    Thanks!

    Pei

  2. #2
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi Pei,

    I think if you have the option (!) to change the column name it would be worth doing, it seems it can create other problems, see below.....

    http://dbforums.com/t773717.html

    It doesn't answer your question though, sorry.

    HTH
    Bill

  3. #3
    Join Date
    Apr 2001
    Location
    Netherlands
    Posts
    173
    You should use quotes.

    select "OPTION" from table;

    hat will work. (Make sure you use CAPITALS if the column name is in capitals. Using quotes makes it case-sensitive)
    Ruud Schilders
    -----------------
    Oracle DBA
    e-mail : ruud@schilders.it
    URL : www.schilders.it
    Twitter : www.twitter.com/ruudschilders

  4. #4
    Join Date
    May 2003
    Posts
    12
    use table_name.column_name

    it will solve the problem i believe.

    bye,

    Raghu.

Posting Permissions

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