What is the difference between MySQL’s create index and alter add index?

The implementation is the same on the server-side.

The only difference is that with CREATE INDEX syntax, you must specify a name for the index.

Whereas with ALTER TABLE, you may specify a name for the index, but you don’t have to.

If you don’t specify a name, the server generates a default name, as the name of the first column in the index, with a number suffix if necessary.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)