954,123 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

create table problems

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
)
baki100
Junior Poster in Training
79 posts since Apr 2009
Reputation Points: 12
Solved Threads: 14
 

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

baki100
Junior Poster in Training
79 posts since Apr 2009
Reputation Points: 12
Solved Threads: 14
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You