Method for the condition corresponding to the Oracle database backup table

Source: Internet
Author: User

Q: How to back up data under a field in a table in the Oracle database?

This problem has plagued me and found a lot of information about it through Baidu search. But none of them can help me solve this problem.

Solution: try to create a temporary table in the library as an experiment and try again.

Create table t_test2 as select * from t_test; ------------ create temporary table t_test2

Log on to the database

Switch to oracle user login su-oracle

Run the following command: exp "database username/password file =/home/oracle/aa. dmp t_tables (t_test2) "query = 'where id <10000 'Log =/home/oracle/$ date. log"

Let's talk about the meaning of this statement separately:

File =/home/oracle/aa. dmp -------- this indicates that the path aa. dmp to be stored is the file name of your backup.

T_tables (t_test2) -------- indicates the table to be exported.

Query = 'where id <10000 '----------- this is the data with the id less than 10000 in the query table. query = ''is a whole. If'' appears again in the middle '', an invalid character is prompted during execution. Pay attention to this part.

Log =/home/oracle/$ date. log ----------- this is the log file for execution. You can view the error information in the log file.

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.