Re: Create Table Question

From: andrewst <member14183_at_dbforums.com>
Date: Thu, 10 Jul 2003 10:50:09 +0000
Message-ID: <3094659.1057834209_at_dbforums.com>


Originally posted by Victor M .
> How would you setup a sample Create Table statement with having to
> specify a constraint name for a Primary Key in the table.
>
> Would it go something like this:
>
> Create Table EMPLOYEES
> (
> FName VARCHAR(15) NOT NULL,
> MINIT CHAR,
> LName VARCHAR(15) NOT NULL,
> SSN CHAR(9) NOT NULL,
> BDATE CHAR(25),
> Address VARCHAR(30),
> Sex CHAR,
> Salary DECIMAL(10,2),
> SUPERSSN CHAR(9),
> DNO INT,
> Primary Key(SSN) Constraint PK_SSN, <------ look here ------
> Foreign Key(SUPERSSN) REFERENCES EMPLOYEES(SSN),
> Foreign Key(DNO) REFERENCES DEPARTMENT(DNUMBER)
> );
>
> Thanks in advance
>
> Victor
..

   DNO INT,
Constraint PK_SSN Primary Key(SSN) ,
..

(BTW the manuals are helpful for finding out correct syntax!)

--
Posted via http://dbforums.com
Received on Thu Jul 10 2003 - 12:50:09 CEST

Original text of this message