Best unofficial Apache Server developers community |
|
please help me how to create index between two tables in mysql? I have "account" and "group" table. i have to index with "group_id with index_id)" and to be unique.
posted via StackOverflow
|
|
 
|
MySQL table indexes are on single tables. Perhaps you're thinking of a FOREIGN KEY, which is only available with the InnoDB storage engine. |
|
 
|
I just learned this myself, here, but apparently if you create a Unique constraint on a field, mySql will automatically create a nonclustered index on that field. |
|
 
|
I think you're looking for a Foreign key. This statement assumes that 'group_id' is a column in the account table and 'index_id' is a column in the group table.
|