12.3. The DB2 EXPORT Utility

The export utility extracts data from a table into a file. Figure 12.4 shows the syntax diagram of the export command.

As you can see, the command supports many different options. Let's start with a simple export command and discuss how to use the options to customize the command. The following example of the export command exports all the rows in the employee table to the file empdata.ixf in IXF format.

					export to empdata.ixf of ixf select * from employee
				

All the keywords in this command are mandatory, that is, you have to provide the output file name, specify the file format, and the SELECT statement that will retrieve the rows to be exported. The exported file can be in a format of DEL, IXF, or WSF.

Using the ...

Get Understanding DB2®: Learning Visually with Examples now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.