Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>Hello everyone,
>>
>>Does anybody knows how to copy a table in an existing database to another different database.
>
>COPY TO newtable DATA dbname WITH CDX && if any indexes
Bruce --
1. I would also add the NAME clause so that the "long" table name gets put into the target database.
2. I've noticed one shortcoming with this approach, though (in 5.0a) -- some things (column names, default values, etc.) do not get copied, so you have to MODIFY STRUCTURE on the target table and add them in by hand. It may be that I have been doing something wrong here, but if I am, I haven't figured it out yet.
Comments?
Thanks -- Bill
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement