Library /sys$common/syshlp/SQL$HELP_OLD72.HLB  —  DROP  COLLATING_SEQUENCE, Examples
    Example 1: Creating, then deleting, a French collating sequence

    The following example creates a collating sequence using the
    predefined collating sequence FRENCH. It then uses the SHOW
    COLLATING SEQUENCE statement to show the defined collating
    sequence.

    The example next deletes the collating sequence using the
    DROP COLLATING SEQUENCE statement. The SHOW COLLATING SEQUENCE
    statement shows that the collating sequence no longer exists.

    SQL> ATTACH 'FILENAME personnel';
    SQL> CREATE COLLATING SEQUENCE FRENCH FRENCH;
    SQL> --
    SQL> SHOW COLLATING SEQUENCE
    User collating sequences in database with filename personnel
         FRENCH
    SQL> --
    SQL> DROP COLLATING SEQUENCE FRENCH;
    SQL> --
    SQL> SHOW COLLATING SEQUENCE
    User collating sequences in database with filename personnel
    No collating sequences found

    Example 2: Deleting a collating sequence used to define a domain
    or database

    The following example shows that you cannot delete a collating
    sequence if a domain or database is defined using the collating
    sequence:

    SQL> CREATE COLLATING SEQUENCE SPANISH SPANISH;
    SQL> CREATE DOMAIN LAST_NAME_SPANISH CHAR (14)
    cont> COLLATING SEQUENCE IS SPANISH;
    SQL> --
    SQL> SHOW DOMAIN LAST_NAME_SPANISH
    LAST_NAME_SPANISH               CHAR(14)
     Collating sequence: SPANISH
    SQL> --
    SQL> SHOW COLLATING SEQUENCE
    User collating sequences in database with filename personnel
         SPANISH
    SQL> --
    SQL> -- You cannot delete the collating sequence because the
    SQL> -- domain LAST_NAME_SPANISH, defined using SPANISH, still exists:
    SQL> --
    SQL> DROP COLLATING SEQUENCE SPANISH;
    %RDB-E-NO_META_UPDATE, metadata update failed
    -RDMS-F-COLUSEDFLD, the collating sequence named SPANISH is used in
    field LAST_NAME_SPANISH
    SQL> --
    SQL> -- Delete the domain:
    SQL> --
    SQL> DROP DOMAIN LAST_NAME_SPANISH;
    SQL> --
    SQL> -- Now you can delete the collating sequence:
    SQL> --
    SQL> DROP COLLATING SEQUENCE SPANISH;
    SQL> --
    SQL> SHOW COLLATING SEQUENCE
    User collating sequences in database with filename personnel
    No collating sequences found
Close Help