Domanda

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?

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top