944,141 Members | Top Members by Rank

Ad:
  • MySQL Discussion Thread
  • Marked Solved
  • Views: 529
  • MySQL RSS
Oct 3rd, 2009
0

create table problems

Expand Post »
can someone help me identify the syntax error with this code
MySQL Syntax (Toggle Plain Text)
  1. CREATE TABLE IF NOT EXISTS Persons
  2. ( id_number VARCHAR(13) NOT NULL
  3. , name VARCHAR(45) NOT NULL
  4. , name_2 VARCHAR(45) NULL
  5. , name_3 VARCHAR(45) NULL
  6. , surname VARCHAR(45) NOT NULL
  7. , date_created DATE
  8. , date_modified DATE
  9. , PRIMARY KEY (id_number)
  10. , INDEX per_id_fk (id_number ASC)
  11. , INDEX per_stat_fk (id_number ASC)
  12. , CONSTRAINT per_id_fk FOREIGN KEY (id_number ) REFERENCES Person_Image (id_number ) ON DELETE CASCADE ON UPDATE CASCADE
  13. , CONSTRAINT per_stat_fk FOREIGN KEY (id_number ) REFERENCES Current_Status (id_number ) ON DELETE CASCADE ON UPDATE CASCADE
  14. )
Last edited by cscgal; Oct 3rd, 2009 at 4:50 pm. Reason: Fixed code tags
Similar Threads
Reputation Points: 12
Solved Threads: 14
Junior Poster in Training
baki100 is offline Offline
79 posts
since Apr 2009
Oct 3rd, 2009
1

Re: create table problems

no worries i found the error, i referenced foreign keys to tables that didn't exist yet
Reputation Points: 12
Solved Threads: 14
Junior Poster in Training
baki100 is offline Offline
79 posts
since Apr 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MySQL Forum Timeline: Compare and update products pricing columns
Next Thread in MySQL Forum Timeline: help with mysql SELECT statement





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC