---
title: "How to Insert Rows in DB2 Tables: 2 Top Methods"
description: "DB2 Insert and Load utility are popular methods to insert data to database."
url: https://srinimf.com/2015/09/16/3-ways-of-data-movement-in-db2/
date: 2015-09-16
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2015/09/pexels-photo-5212649.jpeg?fit=1880%2C1253&ssl=1
categories: ["DB2"]
tags: ["DB2 Database", "DB2 Tips and Solutions"]
type: post
lang: en
---

# How to Insert Rows in DB2 Tables: 2 Top Methods

[In DB2](https://srinimf.com/2012/04/01/db2-triggers-part-2/) you can use these two ways to insert rows. These are using the INSERT query and Utility.

## #1 INSERT Query

Using DML INSERTs gets data into the DB2 tables, but it is not a feasible option for large amounts of data. The LOAD utility is needed for populating tables with large amounts of data.

## #2 Utilities

For removing data from a DB2 table, we can use DML DELETEs, but doing so is not optimal for large amounts of data. For unloading data, better options are DSNTIAUL, UNLOAD, and REORG DISCARD or REORG UNLOAD EXTERNAL.

### Load utility

The LOAD utility is used to load one or more tables of table space. This utility loads records into the tables and builds or extends any indexes defined on them.

If the table space already contains data, you can either add the new data to the existing data or replace the existing data.

The loaded data is processed by any edit or validation routine associated with the table and any field procedure associated with any column of the table.

**Features of Load Utility**

- The LOAD utility will load data coming from a sequential data set into one or more tables in the same table space. Because data is coming in from a non-DB2 source, all integrity checking must be performed: entity integrity, referential integrity, and check integrity.
- The output from LOAD DATA consists of a loaded table space or partition, a discard file of rejected records, and a summary report of errors encountered during processing. (This report is generated only if you specify ENFORCE CONSTRAINTS or if the LOAD involves unique indexes.).

*Related:* [DB2 Jobs and Career Options](http://www.indeed.com/jobs?q=DBA&l=USA&indpubnum=6634974704162507)

Related[DB2- 5 Types of Utilities](https://srinimf.com/2013/04/03/db2-5-types-of-utilities/)

Related

- [DB2 Load Utility Essential Features(2 of 2)](https://srinimf.com/2010/06/12/load-utility-db2/)DateJune 12, 2010
- [DB2 Tough Questions (2 of 4)](https://srinimf.com/2012/01/26/db2-toug-questions-2-of-4/)DateJanuary 26, 2012
- [DB2 LOAD Utility Essential Features(1 of 2)](https://srinimf.com/2010/05/16/db2-load-utility/)DateMay 16, 2010

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2015%2F09%2F16%2F3-ways-of-data-movement-in-db2%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2015%2F09%2Fpexels-photo-5212649.jpeg%3Ffit%3D1200%252C800%26ssl%3D1&description=How%20to%20Insert%20Rows%20in%20DB2%20Tables%3A%202%20Top%20Methods)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2015/09/16/3-ways-of-data-movement-in-db2/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2015/09/16/3-ways-of-data-movement-in-db2/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2015/09/16/3-ways-of-data-movement-in-db2/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2015/09/16/3-ways-of-data-movement-in-db2/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20How%20to%20Insert%20Rows%20in%20DB2%20Tables%3A%202%20Top%20Methods&body=https%3A%2F%2Fsrinimf.com%2F2015%2F09%2F16%2F3-ways-of-data-movement-in-db2%2F&share=email)
-

### Like this:

Like Loading…
