Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2003
    Location
    The Netherlands
    Posts
    149

    Unanswered: tablename beginning with '_'

    Our usertables should begin with an underscore. Does anyone know how or if it is possible in oracle. Something like this. If I put the underscore not in the begin it is possible, but not in this way.

    CREATE TABLE ISH._ss4 (
    _ss2Context integer DEFAULT 0,
    _ss2RecStatus smallint DEFAULT 0,
    _ss2Exported smallint DEFAULT 0,
    _ss2Id varchar(9),
    _ss2Descr varchar(40) DEFAULT NULL,
    PRIMARY KEY ( _ss2Id)
    )

  2. #2
    Join Date
    Jul 2003
    Location
    Kansas, USA
    Posts
    12
    Put the table name in double quotes, but note that this will make the table name case sensitive, so be sure to make it uppercase.

  3. #3
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: tablename beginning with '_'

    This is a really silly idea in an Oracle database. Not only must you put every table name and column name in double quotes when creating the table, but you will have to double quote them whenever you select, insert, update or delete data too - and you will have to use the correct case each time like this:

    select "_ss2Context", "_ss2RecStatus" from "_ss4"
    where "_ss2Id" = 123;

    If I were a user, I'd want to punch somebody!

  4. #4
    Join Date
    Jul 2003
    Location
    Kansas, USA
    Posts
    12
    Agreed, for the record..
    Adam vonNieda
    http://www.oracletool.com

Posting Permissions

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