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.