Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread NOT NULL / CONSTRAINT
Sun, Jun 22 2008 5:09 AMPermanent Link

Heiko Knuettel
Just a question : What is the difference between :

--------------

CREATE TABLE myTable
(
field1 INTEGER NOT NULL,
field2...
)

----------------

and

----------------

CREATE TABLE myTable
(
field1 INTEGER,
field2...
CONSTRAINT "field1nullcheck" CHECK (field1 IS NOT NULL),
)

----------------


TIA,

Heiko
Sun, Jun 22 2008 8:38 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Heiko,

The only difference I can think of is that column constraints are
checked before table constraints, so in the first case the check for
field1 not being null will occur before check constraints, primary key
constraints and foreign key constraints.

--
Fernando Dias
[Team Elevate]
Sun, Jun 22 2008 9:54 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Heiko,

<< Just a question : What is the difference between : >>

Not much - just what Fernando indicated.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sun, Jun 22 2008 6:09 PMPermanent Link

Heiko Knuettel
Thanks !!
Image