Re: Foreign key in Oracle Sql
Date: Fri, 14 Jan 2005 20:17:49 -0800
Message-ID: <41e89962$1_1_at_127.0.0.1>
ak_tiredofspam_at_yahoo.com wrote:
>>>What do you mean there is no VARCHAR2? Are you saying there are no
>
> variable length strings in SQL?
> ..<<
>
> it's called VARCHAR
In a specific product. Does that mean that other products should rename their features?
SQL*Plus: Release 10.1.0.3.0 - Production on Fri Jan 14 20:12:13 2005
Copyright (c) 1982, 2004, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> CREATE TABLE dense (
2 varchar2col VARCHAR2(20),
3 varchar_col VARCHAR(20));
Table created.
SQL> desc dense
Name Null? Type ----------------------------------------- -------- ------------------ VARCHAR2COL VARCHAR2(20) VARCHAR_COL VARCHAR2(20)
SQL> In Oracle VARCHAR exists. But because it is part of the C language it is usable in that context. Perhaps your product doesn't have an equivalent to Pro*C ... or a history that goes back before Microsoft.
>>> Are you saying NULLS should propagate
>
> as strings?
> ..<<
>
> Well, I don't have a middle name, which is a very different situation
> from unknown middle name, correct? So I fail to see the logic in
> Oracle's inability to distinguish between a known empty string and an
> unknown one
>
> SELECT COALESCE('', 'Null') FROM DUAL;
> ---------------
> Null
>
> What do you think?
I think NULL means a lack of a value .... I think a zero length string is a zero length string from twoentirely different things. BTW ... NULL in Oracle does not have single quotes around it.
And I think the entire posturing is a bit ridiculous as each vendors does what they want and those that use their products adjust to their strengths and weaknesses. If you don't like a product ... don't use it. That one calls it VARCHAR, another VARCHAR2, and another PURPLERHINO has a zero value proposition.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Sat Jan 15 2005 - 05:17:49 CET