All pastes #995676 Raw Edit

Unnamed

public text v1 · immutable
#995676 ·published 2008-04-24 11:58 UTC
rendered paste body
CREATE TABLE Employee 
( 
	tfn       INTEGER, 
	union_nr  INTEGER, 
	CONSTRAINT Employee_PK PRIMARY KEY (tfn)
);


CREATE TABLE Technician
 (
       tfn       int    NOT NULL, 
       name      char(30)    NOT NULL, 
       address   char(20)    NOT NULL,
       phone     char(20)   NOT NULL,
       salary    int    NOT NULL,
         CONSTRAINT TFN_PK PRIMARY KEY (tfn)
         CONSTRAINT TFN_FK FOREIGN KEY (tfn) REFERENCES Employee (tfn)
 );

'You have an error in your SQL; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONSTRAINT TFN_FK FOREIGN KEY (tfn) REFERENCES Employee (tfn))' at line 9'