LOAD DATA

Description

The LOAD DATA statement reads rows from a text file into a table at a very high speed.

Syntax

  1. > LOAD DATA
  2. [LOW_PRIORITY | CONCURRENT] [LOCAL]
  3. INFILE 'file_name'
  4. [REPLACE | IGNORE]
  5. INTO TABLE tbl_name
  6. [PARTITION (partition_name [, partition_name] ...)]
  7. [CHARACTER SET charset_name]
  8. [{FIELDS | COLUMNS}
  9. [TERMINATED BY 'string']
  10. [[OPTIONALLY] ENCLOSED BY 'char']
  11. [ESCAPED BY 'char']
  12. ]
  13. [LINES
  14. [STARTING BY 'string']
  15. [TERMINATED BY 'string']
  16. ]
  17. [IGNORE number {LINES | ROWS}]
  18. [(col_name_or_user_var
  19. [, col_name_or_user_var] ...)]
  20. [SET col_name={expr | DEFAULT}
  21. [, col_name={expr | DEFAULT}] ...]

Examples

The SSB Test is an example of LOAD DATA syntax. Complete a SSB Test with MatrixOne

  1. > LOAD DATA INFILE '/ssb-dbgen-path/lineorder_flat.tbl ' INTO TABLE lineorder_flat;