Hello.


> FOREIGN KEY (A_areaNum) REFERENCES Area(areaNum),



Put Area in backticks ('`'). See:

  http://dev.mysql.com/doc/refman/5.0/en/legal-names.html







Nabegh Al-Thalji wrote:

> When I execute the following query

> 

> CREATE TABLE Sponsor (

> sNum INTEGER UNSIGNED NOT NULL,

> sAdrBlock CHAR(2),

> sCivil_ID CHAR(12),

> sDateOfBirth DATE,

> sDrvLicenseExp DATE,

> sDrvLicenseNum CHAR(9),

> sGender ENUM('M','F'),

> sName VARCHAR(20),

> sStatus VARCHAR(20),

> sTelephone CHAR(7),

> A_areaNum INTEGER UNSIGNED NOT NULL,

> G_goverNum INTEGER UNSIGNED NOT NULL,

> O_occupNum INTEGER UNSIGNED NOT NULL,

> N_nationNum INTEGER UNSIGNED NOT NULL,

> PRIMARY KEY (sNum),

> FOREIGN KEY (A_areaNum) REFERENCES Area(areaNum),

> FOREIGN KEY (G_goverNum) REFERENCES Governate(goverNum),

> FOREIGN KEY (O_occupNum) REFERENCES Occupation(occupNum),

> FOREIGN KEY (N_nationNum) REFERENCES Nationality(nationNum)

> );

> 

> I get the following error

> 

> You have an error in your SQL syntax; check the manual that corresponds

> to your MySQL server  version for the right syntax to use near

> 'Area(areaNum),

> FOREIGN KEY    (G_goverNum)  REFERENCES Governate(goverNum),

> at line 17

> 

> Any ideas?

> Thanks

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to