If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > Reserved Word as column name

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
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
Reply With Quote
  #2 (permalink)  
Old
Drunkard
 
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
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: May 2003
Posts: 12
use table_name.column_name

it will solve the problem i believe.

bye,

Raghu.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On