How to make a case-insensitive unique column in SQLite

后端 未结 2 1405
情书的邮戳
情书的邮戳 2021-01-13 08:37

I haven\'t been able to find the answer to this. I\'m trying to create a table with a unique email address column. And when I do

CREATE TABLE users (
  email         


        
2条回答
  •  轮回少年
    2021-01-13 09:12

    For speed, make all your input lower case first, and use a normal unique column.

    This is great for read-more-frequent-than-write use cases because queries just need to compare strings, rather than converting the field first which it must do lots of times to compare.

提交回复
热议问题