hey guys,
im doing a databases project and im a little stuck
this statement wont work(its part of a jdbc) and i get the following error messahe, any suggestions as to why?
stmt.executeUpdate("CREATE TABLE LOCATION (" +
"serial VARCHAR(10)," +
"notice TINYINT(10),"+
"intransit ENUM('T','D')," +
"dtnoticeissued DATETIME," +
"lat NUMERIC(8,4)," +
"long NUMERIC(8,4)," +
"comment STRING(100)" +
"FOREIGN KEY(serial) REFERENCES PACKAGE(serial) ON DELETE CASCADE" +
")Engine=InnoDB;");
OR
CREATE TABLE LOCATION (
serial VARCHAR(),
notice TINYINT(),
inTransit ENUM('T','D'),
dateTimeNoticeIssued DATETIME(),
lat NUMERIC(4,8),
long NUMERIC(4,8),
comment VARCHAR(100),
FOREIGN KEY(serial) REFERENCES PACKAGE(serial) ON DELETE CASCADE
)Engine=InnoDB;
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 'long NUMERIC(8,4),comment STRING(100)FOREIGN KEY(serial) REFERENCES PACKAGE(seri' at line 1