Oracle Sqlldr Use Example

Source: Internet
Author: User

Sqlldr is used to quickly bulk import data,

The example steps are as follows:

1. Determine connection examples for Oracle

username/[email protected]

I'm using:system/ World @ LOCALORCL

The SID is an example of a connection, the service naming in Net Manager, as follows:

  

2. Create a table with the following statement:

CREATE TABLE TT (  ID    INTEGER,  NAME  VARCHAR2  ,  CON    VARCHAR2 (  BYTE),  DT    DATE)

3. Create the data file under the D drive: test.txt
Content:

1,a,,2007-07-8
2,b,,2008-07-8
3,c,,2009-07-8

4. Create the control file under the D drive: Dept.ctl

Content:

Load
InFile "D://test.txt"
Append into table TT
Fields terminated by ","
Trailing Nullcols
(
ID integer external,
Name "Upper (: Name)",
Con ": id| |:name",
DT Date "YYYY-MM-DD"
)

5, CMD under the command line:

Sqlldr System/ World@LOCALORCL Control= D :/Dept.ctl

6, the database to query the TT table,

SELECT * FROM TT

The data are as follows:

Oracle Sqlldr Use Example

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.