Mysql,oracle table data Import each other

Source: Internet
Author: User

MySQL Import Oracle:

For example, there is a ts_user_info table in MySQL and now the User_info table to be imported into Oracle

1: Export MySQL table data to data.txt file

Mysql> SELECT * from Ts_user_info to outfile ' data.txt ' fields terminated by ', ';
Query OK, 2 rows Affected (0.00 sec)

Description: Fields terminated by ', ': Remove the number from the data field

2: Modify the permissions of the Data.txt (pending test)

Chown Oracle:oinstall Data.txt

3: Import data.txt into Oracle User_info table

>load Data characterset ' UTF8 ' infile' /mysql/mysql5.5.8/data/thinksns/data.txt' append into table User_info
Trail   ing nullcols
(table field
< Span style= "COLOR: #ff0000" > < Span style= "COLOR: #ff0000" >  )
Description: APPEND&NBSP; : Indicates that there is data in the table, add it, insert load empty table, replace the original table data to delete directly, Truncate loading Data Replace existing data

< Span style= "COLOR: #0000ff" > < Span style= "COLOR: #ff0000" > trailing nullcols : Allow empty columns to import, Empty column null

Mysql,oracle table data into each other

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.