Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2003
    Posts
    1,074

    Unanswered: How reserved words work

    I know that we should avoid the use of reserved words, but we have some applications we are migrating to Oracle which were created with field names/table names etc which were not reserved when the apps were developed.

    So, in trying to determine how much headache it would give us to leave the names the same, I tried to create objects with reserved words, and I wasn't stopped:

    Code:
    SQL> select * from v$reserved_words where keyword = 'NAME';
    
    KEYWORD                            LENGTH
    ------------------------------ ----------
    NAME                                    4
    
    SQL> create user name identified by name;
    
    User created.
    
    SQL> create table name.name (name varchar2(10));
    
    Table created.
    So, what are the restrictions on using these reserved words then?

    Thanks,
    Chuck

  2. #2
    Join Date
    Jan 2004
    Posts
    492
    Not sure exactly how to answer that except for giving you the link. I can tell you 100% that NAME is not a reserved word for a column, as you can tell. A lot of the Oracle ERP system tables contain a NAME column.

    Anywho heres the link - the ones with asterisks are SQL reserved only - the rest are PL/SQL reserved.

    http://download-west.oracle.com/docs...s.htm#LNPLS019
    Oracle OCPI (Certified Practicing Idiot)

  3. #3
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    SQL> CREATE TABLE DATE (DATE DATE);
    ERROR at line 1:
    ORA-00903: invalid table name

    SQL> CREATE TABLE DATE1 (DATE VARCHAR2(1));
    *
    ERROR at line 1:
    ORA-00904: invalid column name

    Oracle won't allow you to use certain reserved words for objects

    Gregg

Posting Permissions

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