Hi
   Though it is a simple question, i want help reg this.  In the manual
it is giving we can create table with foreign key and references table
to make foreign key concept though it is not supporting the same.  When
i try to create the table with foreign key it is giving

ERROR 1064: You have an error in your SQL syntax near 'order
smallint(2), foreign
key (code) references master(code))' at line 1

My query is:

create table master(code varchar(10) not null, name varchar(20), primary
key (code))

It is creating table correctly

when i try to create this
create table details(code varchar(10),  scode varchar(20), order
smallint(2), foreign key (code) references master(code));

I am getting the above error.  I tried different options.

Can u any of u send me the correct syntax with the example.

My platform is Win NT.

Thanks in advance

Regards
venkatesh




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to