Re: Foreign key in Oracle Sql

From: -CELKO- <jcelko212_at_earthlink.net>
Date: 15 Jan 2005 14:05:28 -0800
Message-ID: <1105826728.810074.233640_at_f14g2000cwb.googlegroups.com>


>> What are the standard data types?<<

Each of these is slightly different, so you need to read the standards. They map to existing implementations very nicely, tho.

NUMERICS:
Exact Numeric:
NUMERIC(s,p), DECIMAL,(s,p) OR DEC, -- all are different! INTEGER or INT, BIGINT, SMALLINT -- all are different! Approximate Numerics:
FLOAT, REAL, DOUBLE PRECISION -- all are different!

CHARACTER:
CHARACTER(n) or CHAR(n)
VARYING CHARACTER(n) or VARCHAR(n),
NATIONAL CHARACTER(n) or NCHAR(n)
NATIONAL VARYING CHARACTER(n) or NVARCHAR(n), and of course NULLs **always** propagate in SQL

TEMPORAL:
DATE
TIME
TIMESTAMP
INTERVAL
>> And are you saying that data types that are not in the standard
should be desupported? <<

Well, I would not program with some of them becasue I want to be able to exchange data with my data warehouse and other systems.

If you use some of the proprietary datatypes, you get screwed. For example, MONEY in the T-SQL family adds punctuation marks and does funny math while DECIMAL(s,p) or NUMERIC(s,p) do not.

Think about porting data or code from Oracle with VARCHAR and VARCHAR2 datatypes. What do I do about NULLs? Or BYTE and BIT datatypes that assume a particular size word and high-end or low-end hardware? Received on Sat Jan 15 2005 - 23:05:28 CET

Original text of this message