Although the personal feeling DB2 is not good for Oracle, but SOA, bought IBM's things, the database also uses IBM's DB2. Just learned how to import and export data from the tables in the DB2 database, and now record them on the blog, lest we forget them later.
Export : Create a new two blank file Xxx.csv (the output file used to hold the data in the table) and log.csv (for storing the log file) in a directory on the disk.
Example: DB2 table in the database test_table
1 First create a Testtbale folder on the disk, and then create a new two blank CSV file within the folder, which is Testtable.csv (the output file used to store the data in the table) and log.csv (for storing the log files).
2 in the DB2 Control center, open the database table, put the mouse on the table test_table, click the right button to select Export, in the export interface "bound Options" by default.
3-point OK to export data
Import : You need an idea when importing, "Del options" next to "Bound Asscii (Del)" In the Import Options interface, click "Del Options" in its popup Interface, change "column delimiter (Doldel)" to "," that is, comma.
Example: DB2 table in the database test_table
1 on the table test_table, right-click to select Import.
2 on the imported pop-up interface, the "Import files" option selects the file testtable.csv, "message file" option to select the file log.csv
3 Select the bounding asscii (del) point "del option"
4 in the Del options interface, change the column delimiter (Doldel) to "," that is, the comma
5-Point OK to import data
DB2 Database table considerations: Table names and field names in the table their length is limited, probably no more than 30 characters, the capacity of each table in the DB2 is also limited (how much is unclear), so when the table has more fields, The size of the type varchar is required, and if the ID of the table is earned, it is best to choose the bigint type.