Thank you Bruce and Paul,
Your explanation help clear a lot of doubts.
So If i create another two tables, let say INVOICE2
and LINEITEM2 with the same construct, when i specify
the index for the foreign key and referenced key,
MYSQL will create a separate index for these two
tables even i only use
At 11:40 -0700 6/7/03, Titu Kim wrote:
Hi,
I have search the mailing list about the
explanation for foreign key in Innodb. I also search
goole groups. I have the following doubts.
1. From the documentation i read about the following.
===
Both tables
Titu Kim wrote:
1. From the documentation i read about the following.
===
Both tables have to be InnoDB type and there must be
an index where the foreign key and the referenced key
are listed as the FIRST columns.
===
> >>>
> >>
> >>equipID is a PRIMARY KEY ;)
> >>
But you don't have index in which ifName is on the first place - and you yave
to have it.
> > Well!!! ifname also a Primary key!!
> >
> >ysql> CREATE TABLE equipment_interfaces (
> >> -> equipID CHAR(20) NOT NULL,
> >> ->
vinita Vigine Murugiah wrote:
Egor Egorov wrote:
On Thursday 16 January 2003 00:12, vinita Vigine Murugiah wrote:
Rafal Jank wrote:
On Wed, 15 Jan 2003 11:02:44 +1100
vinita Vigine Murugiah <[EMAIL PROTECTED]> wrote:
HI
I'm not sure what is wrong with my CREATE TABLE syntax, Please
On Thursday 16 January 2003 00:12, vinita Vigine Murugiah wrote:
> Rafal Jank wrote:
> >On Wed, 15 Jan 2003 11:02:44 +1100
> >
> >vinita Vigine Murugiah <[EMAIL PROTECTED]> wrote:
> >>HI
> >>I'm not sure what is wrong with my CREATE TABLE syntax, Please advice
> >
> >There is no index on ifnam
Rafal Jank wrote:
On Wed, 15 Jan 2003 11:02:44 +1100
vinita Vigine Murugiah <[EMAIL PROTECTED]> wrote:
HI
I'm not sure what is wrong with my CREATE TABLE syntax, Please advice
There is no index on ifname in table equipment_interfaces.
Well.. Then how come Foreign key equipID in table
On Wednesday 15 January 2003 02:02, vinita Vigine Murugiah wrote:
> HI
> I'm not sure what is wrong with my CREATE TABLE syntax, Please advice
[skip]
> mysql> CREATE TABLE equipment_interfaces (
> -> equipID CHAR(20) NOT NULL,
> -> ifName CHAR(20) NOT NULL,
>
On Wed, 15 Jan 2003 11:02:44 +1100
vinita Vigine Murugiah <[EMAIL PROTECTED]> wrote:
> HI
> I'm not sure what is wrong with my CREATE TABLE syntax, Please advice
>
>
There is no index on ifname in table equipment_interfaces.
>
> mysql> CREATE TABLE equipment (
> -> equipID CH