General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only