http://download.oracle.com/docs/cd/B28359_01/server.111/b28319/ldr_concepts.htm#SUTIL003
Below are the main steps of an example:
step 1: prepare the test table(you are recommend to make a sql file to store the ddl to create a table)
create table SAMPLE
(
NAME INTEGER
)
step 2: prepare data files and control file
sample.dat:
100001
100002
100003
100004
100005
sample.bad:
sample.ctrl:
load data
infile 'sample.dat'
badfile 'sample.bad'
append into
table SAMPLE
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
(
name
)
step 3: at system prompt, enter into the directory in which the file above are put
cd $ORACLE_HOME\RDBMS\demo
run the following script(you can also type "sqlldr" to check the usage of the sqlldr):
sqlldr userid=username/password control=sample.ctrl
and you will found data has been inserted into the table.