Fórum mudar nome da tabela... #50138
29/03/2005
0
Gostaria de saber como faço para mudar via sql o nome de uma tabela no firebird, tipo:
Tabela: TblClientes
Mudar para
Clientes
Tabela: TblClientes
Mudar para
Clientes
Thiagopedro
Curtir tópico
+ 0
Responder
Post mais votado
29/03/2005
Acredito que não tenha como. (Colegas, me corrijam se eu estiver errado... )
O que pode ser feito é :
1 - Voce criar uma nova tabela com o nome desejado e a mesma estrutura da outra tabela;
2 - Transferir os dados da tabela antiga para a nova e depois;
3- Dar um ´Drop´ na tabela antiga.
Tudo via SQL.
Espero ter ajudado.
O que pode ser feito é :
1 - Voce criar uma nova tabela com o nome desejado e a mesma estrutura da outra tabela;
2 - Transferir os dados da tabela antiga para a nova e depois;
3- Dar um ´Drop´ na tabela antiga.
Tudo via SQL.
Espero ter ajudado.
Marcelo.l
Responder
Gostei + 1
Mais Posts
30/03/2005
Thiagopedro
Colega a sua dica é muito válida, só gostaria de saber se existe um aplicativo que converte os dados armazenados um uma query tipo de insert dos próprios dados com os respectivos campos.
Responder
Gostei + 0
13/02/2014
Andre Oliveira
Funciona... eu testei...
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;
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;
Responder
Gostei + 1
Clique aqui para fazer login e interagir na Comunidade :)