G. Plante wrote:

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?

Ivan Prenosil answers:

CREATE DOMAIN DX AS VARCHAR(20) COLLATE UNICODE_CI_AI;

ALTER TABLE Tab ALTER COLUMN Col TYPE DX;

Like this post? Share on: TwitterFacebookEmail


Related Articles


Author

Firebird Community

Published

Category

Gems from Firebird Support list

Tags