Jump to content

Collation, Unique vs Index


Recommended Posts

In the collation, I am selecting utf8_general_ci. Is this OK?

It's OK if you want to use case-insensitive UTF-8.


For indexing, when should I use ''unique and when would I use 'index'?

Use unique if you want the database to enforce unique values in that column. Make it an index if it is a foreign key or is often used for searching, like with joins or the WHERE clause.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...