Subject | Re: How to change collattion of a field without droping and recreating it? |
---|---|
Author | emb_blaster |
Post date | 2010-08-19T15:11:19Z |
--- In firebird-support@yahoogroups.com, "guylainplante" <guylainplante@...> wrote:
Do something like:
Create NewColumn with new collate;
update table set NewColumn =OldColumn
Drop OldColumn
Rename NewColumn.
Theres already this suggestion on this list. Sorry i did not put the propper Sql's statments this time.
>you dont need to lose the information, but also theres no way you can do that without drop/creating a new one.
> Hi,
>
> 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?
>
> Thanks.
>
> G. Plante
>
Do something like:
Create NewColumn with new collate;
update table set NewColumn =OldColumn
Drop OldColumn
Rename NewColumn.
Theres already this suggestion on this list. Sorry i did not put the propper Sql's statments this time.