Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.oracle -> Re: column name can't include character '-'

Re: column name can't include character '-'

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Thu, 19 Feb 2004 09:33:32 -0500
Message-ID: <OLWdnaELQvHqVKndRVn-uA@comcast.com>

| SQL> select a, b, a-b, "a-b" from marktest3;
|
| A B A-B a-b
| ---------- ---------- ---------- ----------
| 6 4 2 9
|
| SQL>
| SQL> drop table marktest3;
|
| Table dropped.
|
| If you need a col "a-b" it would be better to name it a_minus_b,
| diff_a_b, or some such than use double quotes to create potential
| problems for users.
|
| HTH -- Mark D Powell --

unless there's a specific identified processing advantage to storing a derived value, the "a-b" or a_minus_b column really should be implemented via a view, not included in the table.
(function-based indexes would be an alternative if searches are often done on the derived value, if an index would be effective in those searches)

Received on Thu Feb 19 2004 - 08:33:32 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US