Re: Foreign key in Oracle Sql

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Fri, 14 Jan 2005 19:41:44 -0800
Message-ID: <41e890ed$1_2_at_127.0.0.1>


-CELKO- wrote:

>>>What are the right data types? <<

>
>
> See SQL Standards for the list. There is no VARCHAR2() or NUMBER(),
> NULLs propagate in strings, there are both FLOAT and REAL, etc.

What do you mean there is no VARCHAR2? Are you saying there are no variable length strings in SQL? Are you saying NULLS should propagate as strings? So a NULL of a numeric or date data type should be converted to a string by the SQL engine?

And since when does Oracle not have both FLOAT and REAL? NUMBER() is a float. So is FLOAT. So is BINARY_FLOAT. And so is REAL.

SQL*Plus: Release 10.1.0.3.0 - Production on Fri Jan 14 19:37:56 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*Plus: Release 10.1.0.3.0 - Production on Fri Jan 14 19:41:12 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 celko (

   2 varstringcol VARCHAR2(20),
   3 floatcol FLOAT(126),
   4 binfloatcol BINARY_FLOAT,
   5 realcol REAL);

Table created.

SQL> desc celko

  Name                                      Null?    Type
  ----------------------------------------- -------- ------------------
  VARSTRINGCOL                                       VARCHAR2(20)
  FLOATCOL                                           FLOAT(126)
  BINFLOATCOL                                        BINARY_FLOAT
  REALCOL                                            FLOAT(63)

SQL> How long has it been since you've actually looked at that which you are commenting upon?

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Received on Sat Jan 15 2005 - 04:41:44 CET

Original text of this message