---
title: "DB2- V10.5 SQL Enhancements"
description: "Starting with DB2® Version 10.5, you can use the EXCLUDE NULL KEYS clause on the CREATE INDEX statement to reduce the size of sparse indexes. https://srinimf.com/2014/05/02/db2-fetch-queryno-optimize/..."
url: https://srinimf.com/2013/11/24/db2-v10-5-sql-enhancements/
date: 2013-11-24
modified: 2026-10-10
author: "Srini"
categories: ["DB2"]
tags: ["DB2 new features", "DB2 Tips and Solutions"]
type: post
lang: en
---

# DB2- V10.5 SQL Enhancements

[![51eXSEzfjOL__SL110_](https://i0.wp.com/srinimf.com/wp-content/uploads/2011/11/51exsezfjol__sl110_.jpg?resize=131%2C222)](https://i0.wp.com/srinimf.com/wp-content/uploads/2011/11/51exsezfjol__sl110_.jpg)

Starting with DB2® Version 10.5, you can use the EXCLUDE NULL KEYS clause on the CREATE INDEX statement to reduce the size of sparse indexes.

Related[DB2 – Fetch 1 Row Vs Optimize 1 Row Top Differences](https://srinimf.com/2014/05/02/db2-fetch-queryno-optimize/)

An index that you create with the EXCLUDE NULL KEYS clause does not insert a key into the index object when all the columns in the key are null. Excluding null keys can help optimize storage and

Related[DB2 V10 New Features to Read now](https://srinimf.com/2010/03/21/db2-new-features/)

performance for cases where you do not want queries to access data that is associated with null keys. For unique indexes, the enforcement of the uniqueness of table data causes rows with null index keys to be ignored.

Rows of table data are organized into blocks called pages, which can be four sizes: 4, 8, 16, or 32 KB. All tables that you create within a [table space](https://srinimf.com/2017/03/24/why-db2-12-adds-rpn-table-space-best-example/) of a particular size have a matching page size.

In previous releases, the maximum number of bytes in a table row was depended on the page size of the table space. Any attempt [to create](https://srinimf.com/2014/06/22/db2-table-space-guidelines/) a table whose row length exceeded the maximum record length for the page size resulted in an error (SQLSTATE 54010).

Related[How to Compare All Columns of a Table as of Version 0 and as of Version 1 in Databricks SQL](https://srinimf.com/2025/03/29/how-to-compare-all-columns-of-a-table-as-of-version-0-and-as-of-version-1-in-databricks-sql/)

For example, in previous releases, you could not create the table in the following statement in a table space with a 4 KB page size because of the table’s large row size:

```
CREATE TABLE T1 (C1 INTEGER, C2 VARCHAR(5000))
```

However, starting with DB2 Version 10.5, you can create table T1 in a table space with a 4 KB page size.

### 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%2F2013%2F11%2F24%2Fdb2-v10-5-sql-enhancements%2F&media=http%3A%2F%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2011%2F11%2F51exsezfjol__sl110_.jpg&description=DB2-%20V10.5%20SQL%20Enhancements)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2013/11/24/db2-v10-5-sql-enhancements/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2013/11/24/db2-v10-5-sql-enhancements/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2013/11/24/db2-v10-5-sql-enhancements/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2013/11/24/db2-v10-5-sql-enhancements/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20DB2-%20V10.5%20SQL%20Enhancements&body=https%3A%2F%2Fsrinimf.com%2F2013%2F11%2F24%2Fdb2-v10-5-sql-enhancements%2F&share=email)
-

### Like this:

Like Loading…
