Examples using CREATE COLLATION
-
Creating a collation using the name found in the
fbintl.conf
file (case-sensitive)CREATE COLLATION ISO8859_1_UNICODE FOR ISO8859_1;
-
Creating a collation using a special (user-defined) name (the “external” name must match the name in the
fbintl.conf
file)CREATE COLLATION LAT_UNI FOR ISO8859_1 FROM EXTERNAL ('ISO8859_1_UNICODE');
-
Creating a case-insensitive collation based on one already existing in the database
CREATE COLLATION ES_ES_NOPAD_CI FOR ISO8859_1 FROM ES_ES NO PAD CASE INSENSITIVE;
-
Creating a case-insensitive collation based on one already existing in the database with specific attributes
CREATE COLLATION ES_ES_CI_COMPR FOR ISO8859_1 FROM ES_ES CASE INSENSITIVE 'DISABLE-COMPRESSIONS=0';
-
Creating a case-insensitive collation by the value of numbers (the so-called natural collation)
CREATE COLLATION nums_coll FOR UTF8 FROM UNICODE CASE INSENSITIVE 'NUMERIC-SORT=1'; CREATE DOMAIN dm_nums AS varchar(20) CHARACTER SET UTF8 COLLATE nums_coll; -- original (manufacturer) numbers CREATE TABLE wares(id int primary key, articul dm_nums ...);