Friday , June 21 2024

Add Data To The Table

In today’s article, we will be learning how to add data to our table using EXTERNAL TABLE and SQL LOADER.

When adding our data to the table, we can follow two methods depending on the size of the data.

The first is to use the external table method, and the other is to import the data with the sqlldr tool.

EXTERNAL TABLE

1. We copy the file we will install with WinSCP somewhere in the operating system.

2. We create a database directory for the directory where the file we copied is located.

3. The user is given read/write rights to the created database directory.

4. We create an external table as follows.

By querying, we see whether the external table is created correctly.

We cannot perform DML operation on external tables, we can also create this table as a normal table.

NOTE: The default value of Reject Limit is 0.

B: SQL LOADER

1. Switch from the operating system to the oracle user.

2. Files are uploaded to any directory with WinSCP.

3. A file named loader.ctl is created in that directory.

4. The following is written into the file.

5. Then the following command is run.

Loading

About Onur ARDAHANLI

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories