Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements >

LOAD

Use the LOAD statement to insert data from an operating-system file into an existing table or view.

This statement is an extension to the ANSI/ISO standard for SQL. You can use this statement only with DB–Access.

Syntax

Read syntax diagramSkip visual syntax diagram>>-LOAD FROM--'filename'--+------------------------+------------>
                          '-DELIMITER--'delimiter'-'
 
>--INSERT INTO--+-table---+--+------------------+--------------><
                +-view----+  |    .-,------.    |
                '-synonym-'  |    V        |    |
                             '-(----column-+--)-'
 

Element Description Restrictions Syntax
column Column to receive data values from filename See INSERT INTO Clause. Identifier
delimiter Character to separate data values in each line of the load file. Default delimiter is the pipe ( | ) symbol. See DELIMITER Clause. Quoted String
filename Path and filename of file to read. Default pathname is current directory See LOAD FROM File. Specific to operating system rules
synonym, table, view Synonym for the table in which to insert data from filename Synonym and table or view to which it points must exist Database Object Name

Usage

The LOAD statement appends new rows to the table. It does not overwrite existing data. You cannot add a row that has the same key as an existing row.

C-style comments are not valid within the LOAD statement.

To use the LOAD statement, you must have Insert privileges for the table where you want to insert data. For information on database-level and table-level privileges, see the GRANT statement.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]