# Bulk-Export

Derby provides two export procedures you can use to perform bulk-export operations:

1. To export all the data from a table to a file, use the SYSCS_UTIL.SYSCS_EXPORT_TABLE procedure. The procedure definition is:

       SYSCS_UTIL.SYSCS_EXPORT_TABLE (IN schemaName VARCHAR(128),
       IN tableName VARCHAR(128), IN fileName VARCHAR(32672),
       IN columnDelimiter CHAR(1), IN characterDelimiter CHAR(1),
       IN codeset VARCHAR(128))

   No Result is returned from the procedure.
2. To export the result of a SELECT statement to a file, use the SYSCS_UTIL.SYSCS_EXPORT_QUERY procedure. The procedure definition is:

       SYSCS_UTIL.SYSCS_EXPORT_QUERY(IN selectStatement VARCHAR(32672),
       IN tableName VARCHAR(128), IN fileName VARCHAR(32672),
       IN columnDelimiter CHAR(1), IN characterDelimiter CHAR(1),
       IN codeset VARCHAR(128))

   No result is returned from the procedure.

- Arguments to the export procedure

Parent topic: Bulk import and export
Related concepts
Importing into tables with identity columns
Executing import/export procedures from JDBC
File format for input and output
Treatment of NULLS
Related reference
Bulk-Import
Examples of bulk import and export
CODESET values for import/export