Hello, I need help understanding what '
index (foreignkey)' does below:
Code:
CREATE TABLE user (id integer not null primary key auto_increment,
email varchar(255) not null,
entered datetime,
modified timestamp,
uniqid varchar(255),
unique (email),
password varchar(255),
foreignkey varchar(100),
index (foreignkey),
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!