Hello, I need help understanding what 'index (foreignkey)' does below:
CREATE TABLE user (id integer not null primary key auto_increment,
email varchar(255) not null,
index idx_uniqid (uniqid),
index emailidx (email),
index enteredindex (entered) )
As you can see, the last four lines are all in the form: index index-name (column-name)
Except the fourth line up 'index (foreignkey)' does not have any "index-name".
Does this line actually create an index like the three lines below it? Or, does it perform some other function? If it creates an index, how is it there is no name?
I am trying to understand what this one line does. Much thanks!
actually, in any database an index name is useless to anyone but the DAB team. You are not going to select data from an index. Even if you have index only access on a particular query, it is from the table that you query. The DBA staff have a different picture of the database and would on occasion need to know the name of an index.