Who Can Create a Collation
The CREATE COLLATION
statement can be executed by:
-
Users with the
CREATE COLLATION
privilege
The user executing the CREATE COLLATION
statement becomes the owner of the collation.
The CREATE COLLATION
statement can be executed by:
Users with the CREATE COLLATION
privilege
The user executing the CREATE COLLATION
statement becomes the owner of the 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 ...);
DROP COLLATION
Drops a collation from the database
DSQL
DROP COLLATION collname
Parameter | Description |
---|---|
collname |
The name of the collation |
The DROP COLLATION
statement removes the specified collation from the database, if it exists.An error will be raised if the specified collation is not present.
Tip
|
If you want to remove an entire character set with all its collations from the database, declare and execute the stored procedure |
The Drop COLLATION
statement can be executed by:
The owner of the collation
Users with the DROP ANY COLLATION
privilege
DROP COLLATION
ES_ES_NOPAD_CI
collation.DROP COLLATION ES_ES_NOPAD_CI;