---
description: "In this tutorial, we will learn about SAP HANA Data Types: Date times, Numeric, Boolean, Decimal, Character string, binary, & SAP HANA Identifiers."
title: "SAP HANA Data Types: Numeric, Character String, Decimal"
image: https://www.guru99.com/images/sap-hana-data-types.png
---

[Skip to content](#main)

**⚡ Smart Summary**

SAP HANA Data Types define what each column may store, covering date time, numeric, boolean, character string, binary, large object, and multi-valued classifications, each mapping to a specific column store type.

- 🗓️ **Date Time Types:** DATE, TIME, SECONDDATE, and TIMESTAMP differ by the precision they retain.
- 🔢 **Numeric Range:** TINYINT through BIGINT cover integers, while DECIMAL, SMALLDECIMAL, REAL, and DOUBLE handle fractions.
- 🔤 **Character Strings:** VARCHAR holds bytes and NVARCHAR holds Unicode characters, both limited to 5000.
- 📦 **Large Objects:** BLOB, CLOB, NCLOB, TEXT, and BINTEXT store data too large for a normal column.
- 🔍 **Search Enabled:** TEXT, BINTEXT, and SHORTTEXT support full text search but only on column store tables.
- ✍️ **Identifiers:** Delimited identifiers sit inside double quotes and accept any character; undelimited ones must start with a letter.
- ❝ **Quotation Rule:** Single quotes delimit a string value and double quotes delimit an identifier.

Read More

![SAP HANA data types](https://www.guru99.com/images/sap-hana-data-types.png)

In this SAP HANA Data Types tutorial, we will learn:

1\) **SAP HANA Data Types** – SAP HANA data types include Date Times, Numeric data type, Boolean, Character String, Binary data types, etc.

2\) **SAP HANA Identifiers** – Delimited Identifiers and Undelimited Identifiers

## Data Types in SAP HANA

In SAP HANA Database, [SQL](https://www.guru99.com/sql.html) Data Types are as below:

| Classification | Sub-Classification | SQL Data Type | Column Store Type | Default Format |
| --- | --- | --- | --- | --- |
| **Date Times Types** | Date | DATE | CS\_DAYDATE | ‘YYYY-MM-DD’ |
|  | Time | TIME | CS\_SECONDTIME | ‘HH24:MI:SS’ |
|  | Second Date | SECONDDATE | CS\_LONGDATE | ‘YYYY-MM-DD HH24:MI:SS’ |
|  | Time Stamp | TIMESTAMP | CS\_SECONDDATE | ‘YYYY-MM-DD HH24:MI:SS.FFn’ |
| **Numeric Types** | Tiny Integer | TINYINT | CS\_INT | 8-bit unsigned integer, Range 0 To 255 |
|  | Small Integer | SMALLINT | CS\_INT | 16-bit signed integer, Range -32,768 To 32,767 |
|  | Integer | INTEGER | CS\_INT | 32-bit signed integer, Range -2,147,483,648 To 2,147,483,647 |
|  | Big Integer | BIGINT | CS\_FIXED(18,0) | 64-bit signed integer, Range -9,223,372,036,854,775,808 To 9,223,372,036,854,775,807 |
|  | Decimal | DECIMAL(p,s)<br>p-Precision<br>s- scale | CS\_FIXED(p-s,s) | Precision p can range from 1 to 38.<br>The scale s can range from 0 to p for SAP HANA decimal data type.<br>If precision and scale are not specified, DECIMAL becomes a floating-point decimal number. |
|  | Small Decimal | SMALLDECIMAL | CS\_SDFLOAT | It is a floating-point decimal number. The precision and scale should be within the range 1\~16 for precision and -369\~368 for scale, depending on the stored value. SMALLDECIMAL is only supported for column store Table. |
|  | Real Number | REAL | CS\_FLOAT | single-precision 32-bit floating-point number |
|  | Double Number | DOUBLE | CS\_DOUBLE | a double-precision 64-bit floating-point number |
|  | Float | FLOAT(n) | CS\_DOUBLE | It is 32-bit or 64-bit real number. Where n specifies the number of bits and should be in the range between 1 and 53. |
| **Boolean** | Boolean | BOOLEAN | CS\_INT | TRUE, FALSE And UNKNOWN (NULL). |
| **Character String** | Variable-Length Character String | VARCHAR(n) | CS\_STRING | This HANA string length data type is a Variable-length character string, where ‘n’ specified the maximum length in bytes and this is an integer between 1 and 5000. |
|  | Variable-Length Unicode character | NVARCHAR(n) | CS\_STRING | Variable-length Unicode character set string, where \<n> indicates the maximum length in characters and is an integer between 1 and 5000 |
|  | Alpha Numeric Character | ALPHANUM(n) | CS\_ALPHANUM | Variable length alpha-numeric characters, where n indicates the maximum length and is an integer between 1 and 127 |
|  | Short Text | SHORTTEXT(n) | CS\_STRING | It is Variable-length character string which provide text search and string search features. This data type can be defined for column store tables, but not for row tables. |
| **Binary Types** | Binary Text | VARBINARY(n) | CS\_RAW | Store binary data of a specified maximum length in bytes, where n indicates the maximum length and is an integer between 1 and 5000. |
| **LOB Types(Large Object Types)** | Binary LOB | BLOB | CS\_RAW | Large amounts of binary data |
|  | Character LOB | CLOB | CS\_STRING | ASCII character data |
|  | Unicode Character LOB | NCLOB | CS\_STRING | Large Unicode character object |
|  | TEXT | TEXT | CS\_STRING | The TEXT data type provide text search features. This data type can be defined for column Store tables, but not for row store tables. |
|  | BINARY Text Data | BINTEXT | CS\_STRING | The BINTEXT data type is similar to data type TEXT and thus supports text search features, but it is possible to insert binary data. This data type can be defined for column tables, but not for row tables. |
| **Multi-valued Types** | Array | ARRAY |  | It stores collections of values of the same data type where each element is related with exactly one position. Arrays can contain NULL values as in the absence of a value. |

## Choosing the Right SAP HANA Data Type

The table above lists what is available. Choosing well matters more in SAP HANA than in a disk based database, because every column lives in memory and an oversized type consumes a scarce resource on every row.

Four rules cover most decisions:

- **Take the smallest numeric type that fits.** A status flag with five possible values needs TINYINT, not INTEGER. Across a billion row table the difference is measured in gigabytes of memory.
- **Never store money in REAL or DOUBLE.** Floating point cannot represent decimal fractions exactly, so totals drift by fractions of a currency unit. Use DECIMAL with an explicit precision and scale.
- **Prefer NVARCHAR to VARCHAR.** VARCHAR counts bytes and NVARCHAR counts characters, so any non ASCII text truncates unexpectedly in VARCHAR. Modern SAP HANA releases treat VARCHAR as NVARCHAR for exactly this reason.
- **Match date precision to the requirement.** DATE for a calendar day, SECONDDATE where the time of day matters, and TIMESTAMP only where sub second precision is genuinely used. Each step up costs storage on every row.

Large object types deserve particular caution. A BLOB or NCLOB column is convenient but heavy, and text search on TEXT or SHORTTEXT works only on column store tables, so the storage choice and the data type choice are linked. Storage options are covered in the [SAP HANA SQL](https://www.guru99.com/sap-hana-sql.html) tutorial.

## SAP HANA Identifiers

Identifiers are used to represent name in [SQL](https://www.guru99.com/sql.html) statement (e.g. table name, view name, column name, index name, synonym name, procedure name, function name, etc.)

There are two types of identifiers in [SAP HANA](https://www.guru99.com/sap-hana-tutorial.html): Delimited identifiers and Undelimited identifiers.

- **Delimited Identifiers** – It is enclosed in the delimiter, Double Quotes “”. The identifier can contain any character including special character.
- **Undelimited Identifiers** – Undelimited identifiers (table name, column name) must start with a letter and cannot contain any symbols other than a digit or an underscore ‘\_’.

There are two types Quotation mark for delimit as below-

- **Single Quotation Mark (‘ ‘)** – It is used to delimit the string.
- **Double Quotation Mark (” “)**– It is used for delimiting identifiers.

**⚠️ Warning:** An undelimited identifier is converted to upper case when the object is created. Creating a table as employee and later selecting from “employee” in lower case fails, because the stored name is EMPLOYEE. Either avoid double quotes entirely, or use them consistently.

**Don't Miss:**

- [SAP HANA SQL: Learn Basic Statements in 10 Minutes](https://www.guru99.com/sap-hana-sql.html)
- [SAP HANA Calculation View: Types & How to Create](https://www.guru99.com/sap-hana-calculation-view.html)
- [What is SLT in SAP HANA? Replication & Configuration](https://www.guru99.com/slt-sap-landscape-transformation-replication-server-in-sap-hana.html)
- [SAP HANA Tutorial PDF – S4 Training Material (Free Download)](https://www.guru99.com/sap-hana-tutorial-pdf.html)

## Data Type Conversion and Common Errors

SAP HANA converts between compatible types automatically, but implicit conversion is the quiet source of wrong results and slow queries. Explicit conversion makes the intention visible.

Two functions do the work. CAST converts a value to a named type, and TO\_DATE, TO\_VARCHAR, TO\_DECIMAL and their relatives convert with an optional format string.

```
-- Explicit conversion with CAST
SELECT CAST('1234' AS INTEGER) FROM DUMMY;

-- Conversion with an explicit format
SELECT TO_DATE('2026-07-21', 'YYYY-MM-DD') FROM DUMMY;

-- Number to string with fixed decimals
SELECT TO_DECIMAL(1234.5678, 10, 2) FROM DUMMY;
```

Four errors account for most conversion problems:

1. **Numeric overflow.** Inserting 40000 into a SMALLINT fails because the signed range stops at 32,767. The message names the column rather than the value, so check the definition first.
2. **String truncation.** Loading text longer than the declared length raises an error rather than silently cutting it. Count characters against NVARCHAR and bytes against VARCHAR.
3. **Invalid date format.** Passing a string in the wrong pattern to TO\_DATE fails. Always supply the format mask instead of relying on the session default.
4. **Implicit conversion in a WHERE clause.** Comparing a character column against a number forces a conversion on every row, which prevents efficient filtering. Convert the constant instead of the column.

The comparison symbols used in these filters are covered in [SAP HANA operators](https://www.guru99.com/sap-hana-operator.html), and the wider platform in the [SAP HANA tutorial](https://www.guru99.com/sap-hana-tutorial.html) series.

## FAQs

🔤 What is the difference between VARCHAR and NVARCHAR?

VARCHAR measures its limit in bytes and NVARCHAR in Unicode characters. For any text that may contain non ASCII characters, NVARCHAR is the safe choice because it will not truncate unexpectedly.

🕒 When should SECONDDATE be used instead of TIMESTAMP?

Use SECONDDATE when second level precision is enough, which covers most business events. TIMESTAMP adds fractional seconds and costs more storage on every row of a large table.

🤖 Can AI recommend data types from sample data?

Yes. Profiling a source file reveals actual value ranges, lengths, and formats, from which AI proposes the smallest safe type for each column instead of a defensive oversized default.

🧠 Can AI find memory waste caused by oversized types?

Yes. Comparing declared lengths against values actually stored highlights columns that could shrink, which matters because every column of a HANA table is held in memory.

🔍 Which data types support full text search?

TEXT, BINTEXT, and SHORTTEXT provide text search features. All three are restricted to column store tables and cannot be defined on a row store table.

#### Summarize this post with:

ChatGPTPerplexityGrokGoogle AI

**Stay Updated on AI** **Get Weekly AI Skills, Trends, Actionable Advice.**

##### Sign up for the newsletter

Subscribe for Free

You have successfully subscribed.  
Please check your inbox.

![AI-Newsletter]() Chosen by over **350,000+** professionals

[Scroll to top](#wrapper)

×

Search for:

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.guru99.com/#organization","name":"Guru99","sameAs":["https://www.facebook.com/Guru99Official","https://twitter.com/guru99com"],"logo":{"@type":"ImageObject","@id":"https://www.guru99.com/#logo","url":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","contentUrl":"https://www.guru99.com/images/guru99-logo-v1-150x59.png","caption":"Guru99","inLanguage":"en-US"}},{"@type":"WebSite","@id":"https://www.guru99.com/#website","url":"https://www.guru99.com","name":"Guru99","publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https://www.guru99.com/images/sap-hana-data-types.png","url":"https://www.guru99.com/images/sap-hana-data-types.png","width":"700","height":"250","caption":"SAP HANA Data Types","inLanguage":"en-US"},{"@type":"BreadcrumbList","@id":"https://www.guru99.com/sap-hana-data-type.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":"1","item":{"@id":"https://www.guru99.com","name":"Home"}},{"@type":"ListItem","position":"2","item":{"@id":"https://www.guru99.com/sap-hana","name":"SAP-HANA"}},{"@type":"ListItem","position":"3","item":{"@id":"https://www.guru99.com/sap-hana-data-type.html","name":"SAP HANA Data Types: Numeric, Character String, Decimal"}}]},{"@type":"WebPage","@id":"https://www.guru99.com/sap-hana-data-type.html#webpage","url":"https://www.guru99.com/sap-hana-data-type.html","name":"SAP HANA Data Types: Numeric, Character String, Decimal","dateModified":"2026-10-09T13:25:43+05:30","isPartOf":{"@id":"https://www.guru99.com/#website"},"primaryImageOfPage":{"@id":"https://www.guru99.com/images/sap-hana-data-types.png"},"inLanguage":"en-US","breadcrumb":{"@id":"https://www.guru99.com/sap-hana-data-type.html#breadcrumb"}},{"@type":"Person","@id":"https://www.guru99.com/author/editorial","name":"Editorial Team","url":"https://www.guru99.com/author/editorial","image":{"@type":"ImageObject","@id":"https://www.guru99.com/images/favicon-new-logo.png","url":"https://www.guru99.com/images/favicon-new-logo.png","caption":"Editorial Team","inLanguage":"en-US"},"sameAs":["https://www.guru99.com/editorial-team"],"worksFor":{"@id":"https://www.guru99.com/#organization"}},{"articleSection":"SAP-HANA","headline":"SAP HANA Data Types: Numeric, Character String, Decimal","description":"In this tutorial, we will learn about SAP HANA Data Types: Date times, Numeric, Boolean, Decimal, Character string, binary, &amp; SAP HANA Identifiers.","keywords":"sap-hana","speakable":{"@type":"SpeakableSpecification","cssSelector":[".entry-title",".summary"]},"@type":"Article","author":{"@id":"https://www.guru99.com/author/editorial","name":"Editorial Team"},"dateModified":"2026-10-09T13:25:43+05:30","image":{"@id":"https://www.guru99.com/images/sap-hana-data-types.png"},"copyrightYear":"2026","name":"SAP HANA Data Types: Numeric, Character String, Decimal","subjectOf":[{"@type":"FAQPage","mainEntity":[{"@type":"Question","name":"What is the difference between VARCHAR and NVARCHAR?","acceptedAnswer":{"@type":"Answer","text":"VARCHAR measures its limit in bytes and NVARCHAR in Unicode characters. For any text that may contain non ASCII characters, NVARCHAR is the safe choice because it will not truncate unexpectedly."}},{"@type":"Question","name":"When should SECONDDATE be used instead of TIMESTAMP?","acceptedAnswer":{"@type":"Answer","text":"Use SECONDDATE when second level precision is enough, which covers most business events. TIMESTAMP adds fractional seconds and costs more storage on every row of a large table."}},{"@type":"Question","name":"Can AI recommend data types from sample data?","acceptedAnswer":{"@type":"Answer","text":"Yes. Profiling a source file reveals actual value ranges, lengths, and formats, from which AI proposes the smallest safe type for each column instead of a defensive oversized default."}},{"@type":"Question","name":"Can AI find memory waste caused by oversized types?","acceptedAnswer":{"@type":"Answer","text":"Yes. Comparing declared lengths against values actually stored highlights columns that could shrink, which matters because every column of a HANA table is held in memory."}},{"@type":"Question","name":"Which data types support full text search?","acceptedAnswer":{"@type":"Answer","text":"TEXT, BINTEXT, and SHORTTEXT provide text search features. All three are restricted to column store tables and cannot be defined on a row store table."}}]}],"@id":"https://www.guru99.com/sap-hana-data-type.html#schema-1147638","isPartOf":{"@id":"https://www.guru99.com/sap-hana-data-type.html#webpage"},"publisher":{"@id":"https://www.guru99.com/#organization"},"inLanguage":"en-US","mainEntityOfPage":{"@id":"https://www.guru99.com/sap-hana-data-type.html#webpage"}}]}
```
