문제

I am creating a database in an Android application. Values in a text column are really unique if they meet the following requirements:

  • No null strings. NOT NULL
  • No equal strings. UNIQUE
  • No empty strings. CHECK.
  • Case considerations shouldn't be ignored. If "Lorem" is already in the column, "LoREM" shouldn't be inserted.

I read about user-defined functions a little. Do I have to create one the last requirement to be met?

도움이 되었습니까?

해결책

Add COLLATE NOCASE to the column specification to get the fourth requirement met.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top