mysql - table column marked as unique, means it's indexed too, right? -
i'm trying setup mysql table. following:
id (integer, auto increment, primary) username (varchar 32, unique) email (varchar 32, unique)
i don't want allow duplicate usernames or email addresses in table. example, @ startup, i'll test if supplied username or email exist in table - if do, i'll cancel signup.
if mark username , email columns "unique", mean they're indexed? i'd them indexed can already-exists check efficiently possible,
thanks
yes indexed. how database already-exists check efficiently possible.
Comments
Post a Comment