Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top