FirebirdSQL logo
 EXCEPTIONCHARACTER SET 

Examples using CREATE COLLATION

  1. Creating a collation using the name found in the fbintl.conf file (case-sensitive)

    CREATE COLLATION ISO8859_1_UNICODE FOR ISO8859_1;
  2. 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');
  3. 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;
  4. 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';
  5. 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

Available in

DSQL

Syntax
DROP COLLATION collname
Table 1. DROP COLLATION Statement Parameters
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 sp_unregister_character_set(name) from the misc/intl.sql subdirectory of the Firebird installation.