Subject Re: [firebird-support] How to change collattion of a field without droping and recreating it?
Author Ivan Prenosil
> I have a database with several tables and each table contains several varchar fields. The default character set of the database is
> UTF8 so I neved had to specify it at field level. I never specified collation either so by default, all varchar fields have no
> collation specified.
>
> Now, I would like to change the collation of all my varchar fields to the new UNICODE_CI_AI.
>
> Is there an easy way to do that without having to drop and recreate fields and also without loosing information?

CREATE DOMAIN DX AS VARCHAR(20) COLLATE UNICODE_CI_AI;

ALTER TABLE Tab ALTER COLUMN Col TYPE DX;