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

Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamice SQL in Oracle

Re: Dynamice SQL in Oracle

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Tue, 10 May 2005 08:30:57 -0700
Message-ID: <1115738806.548860@yasure>


Thomas Kellerer wrote:

> On 10.05.2005 09:29 DA Morgan wrote:
>

>>Heck if you had read even one
>>page of Oracle documentation you'd know you should not be using the
>>VARCHAR data type to create a table.

>
>
> Hmm. The manual for 8,9 and 10 says
>
> "The VARCHAR datatype is currently synonymous with the VARCHAR2 datatype."
>
> I admit, it also says that "In future releases, VARCHAR might be defined as a
> separate datatype".
>
> But for all "current" versions of Oracle (8, 9 and 10) VARCHAR *is* effectively
> the same as VARCHAR2
>
> Thomas
>
> P.S.: I never understood why Oracle used a non-standard keyword to denote the
> "standard" data type. If they wanted to introduce a non-standard type in the
> future, why didn't they reserve a non-standard keyword for that....

Currently synonymous is also synonymous with "Oracle reserves the right to change it at any time and break every line of code in your application."

And in 10.1.0.4 this is what you get:

SQL> create table t (

   2 testcol varchar(20));

Table created.

SQL> desc t

  Name                                      Null?    Type
  ----------------------------------------- -------- ------------
  TESTCOL                                            VARCHAR2(20)

Oracle is now smart rewrite the create table so using VARCHAR has become impossible. That's one way to deal with developers that either don't read or don't understand the intent of the docs.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Tue May 10 2005 - 10:30:57 CDT

Original text of this message

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