quinta-feira, 4 de junho de 2009

Renomear uma tabela no Firebird

Existe um mito que diz não ser possível renomear nome de tabelas no banco de dados Firebird.
Realmente pelo tradicional commando ALTER TABLE não é possível renomear, coisa que aliás, faz falta durante o desenvolvimento de um sistema.
Porém podemos usar as tabelas de sistema do Firebird para tarefas como esta, desde que tenhamos acesso como SYSDBA:

UPDATE RDB$RELATIONS
SET RDB$RELATION_NAME='NOVO_NOME' where
RDB$RELATION_NAME='NOME_ANTIGO';

UPDATE RDB$RELATION_FIELDS
SET RDB$RELATION_NAME='NOVO_NOME' where
RDB$RELATION_NAME='NOME_ANTIGO' and
RDB$SYSTEM_FLAG=0;

How to Enable Click to Minimize On Ubuntu

Open a terminal using Ctrl+Alt+T shortcut or searching for it in the menu. All you need is to copy paste the command below in the terminal: ...