Bug #30586 My SQL table creation
Submitted: 23 Aug 2007 7:42 Modified: 23 Aug 2007 7:54
Reporter: kate jinu Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Errors Severity:S2 (Serious)
Version: OS:Any
Assigned to: CPU Architecture:Any

[23 Aug 2007 7:42] kate jinu
Description:
On executing the folowing querry
--------------------------------------------------------------
create table books (
    id                     int            not null auto_increment,
    name                   varchar(100)   not null,
    issue                  int            default ,
    category               int            not null,
    constraint fk_books_user foreign key (issue) references user_table(id),
    constraint fk_books_category foreign key (category) references catogories(id),
    primary key(id)
) engine=InnoDB;

-------------------------------------------------------------------

I am getting the following error message.

------------------------------------------------------------------
ERROR 1064 (42000): 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 '
    category               int            not null,
    constraint fk_books_use' at line 4

How to repeat:
NA
[23 Aug 2007 7:54] Sveta Smirnova
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://dev.mysql.com/doc/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Thank you for the report. You really have error in the statement. See also http://dev.mysql.com/doc/refman/5.0/en/create-table.html