| |

VerySource

 Forgot password?
 Register
Search
View: 1603|Reply: 4

How can I import the tables in the old database into the new database?

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-24 19:00:01
| Show all posts |Read mode
A database application is being designed. In the middle of the design, the database was re-planned, so the original database is no longer used, and a new database and database table structure are enabled. However, an important table has been output in the original. A lot of data, after checking the structure of the new database table and the original database table, and found that the structure of the table has not changed, in order to use the original data in the new database, how to do the best?
Reply

Use magic Report

0

Threads

10

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-2-14 19:45:02
| Show all posts
Method 1. Export this table in the original database, and then import it into the new database. Use EXP and IMP.
2.Start both databases, use DBLINK, create an identical table in the new database, and then directly use SQL statements to insert data from the old database into this table in the new database
Reply

Use magic Report

0

Threads

71

Posts

50.00

Credits

Newbie

Rank: 1

Credits
50.00

 China

Post time: 2020-2-16 11:30:02
| Show all posts
Method 1: Use exp / imp to export and import according to the table
Option 2: Use the copy command
Method 3: Use db_link for insert
Reply

Use magic Report

0

Threads

2

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-6 10:45:01
| Show all posts
On the same machine, use insert into new_table select * from old_tab where 1=1; This is ok
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-9-6 11:45:01
| Show all posts
exp table.
If both libraries coexist, then directly, create table xx as select * from xxx;
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list