0

can someone help me identify the syntax error with this code

CREATE  TABLE IF NOT EXISTS Persons 
(  id_number VARCHAR(13) NOT NULL 
    ,  name VARCHAR(45) NOT NULL 
    ,  name_2 VARCHAR(45) NULL 
    ,  name_3 VARCHAR(45) NULL 
    ,  surname VARCHAR(45) NOT NULL 
    ,  date_created DATE
    ,  date_modified DATE
    ,  PRIMARY KEY (id_number) 
    ,  INDEX per_id_fk (id_number ASC) 
    ,  INDEX per_stat_fk (id_number ASC) 
    ,  CONSTRAINT per_id_fk    FOREIGN KEY (id_number )    REFERENCES Person_Image (id_number )    ON DELETE CASCADE    ON UPDATE CASCADE
    ,  CONSTRAINT per_stat_fk    FOREIGN KEY (id_number )    REFERENCES Current_Status (id_number )    ON DELETE CASCADE    ON UPDATE CASCADE
)

Edited by Dani: Fixed code tags

1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by baki100
1

no worries i found the error, i referenced foreign keys to tables that didn't exist yet

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.