Re: Simple question (probably)

From: Joe Celko <71062.1056_at_compuserve.com>
Date: 2000/04/15
Message-ID: <8daqrs$5b1$1_at_nnrp1.deja.com>#1/1


Tery something like this

 CREATE TABLE Shirts
(shirt_id INTEGER NOT NULL PRIMARY KEY,
  quantity INTEGER NOT NULL,
   ... );

 CREATE TABLE ShirtStyles
(shirt_id INTEGER NOT NULL

           REFERENCES Shirts(shirt_id)
           ON DELETE CASCADE
           ON UPDATE CASCADE,
  size INTEGER NOT NULL
       CHECK (size IN (12,13,14, ... )),
  color
  ...,
  PRIMARY KEY (shirt_id, size));

--CELKO--
Joe Celko, SQL and Database Consultant

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sat Apr 15 2000 - 00:00:00 CEST

Original text of this message