---
title: DOUBLE type
description: The DOUBLE type represents 8-byte double-precision floating point numbers in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/data-types/double-type
---

# `DOUBLE` type

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime

Represents 8-byte double-precision floating point numbers.

## Syntax

```
DOUBLE
```

## Limits

The range of numbers is:

* -∞ (negative infinity)
* -1.79769E+308 to -2.225E-307
* 0
* +2.225E-307 to +1.79769E+308
* +∞ (positive infinity)
* NaN (not a number)

## Literals

```
decimal_digits  { D | exponent [ D ] }
| digit [ ... ] { exponent [ D ] | [ exponent ] D }

decimal_digits:
[ + | - ] { digit [ ... ] . [ digit [ ... ] ]
            | . digit [ ... ] }

exponent:
E [ + | - ] digit [ ... ]
```

`digit`: Any numeral from 0 to 9.

The `D` postfix and `E` exponent are case insensitive.

## Notes

DOUBLE is a base-2 numeric type. When given a literal which is base-10 the representation may not be exact.
Use [`DECIMAL` type](https://docs.databricks.com/aws/en/sql/language-manual/data-types/decimal-type.md) to accurately represent fractional or large base-10 numbers.

## Examples

```sql
> SELECT +1D;
  1.0

> SELECT 5E10;
  5E10

> SELECT 5.3E10;
  5.3E10

> SELECT -.1D;
  -0.1

> SELECT 2.D;
  2.0

> SELECT -5555555555555555.1D
-5.555555555555555E15

> SELECT CAST(-6.1 AS DOUBLE)
 -6.1
```

## Related

* [`TINYINT` type](https://docs.databricks.com/aws/en/sql/language-manual/data-types/tinyint-type.md)
* [`SMALLINT` type](https://docs.databricks.com/aws/en/sql/language-manual/data-types/smallint-type.md)
* [`INT` type](https://docs.databricks.com/aws/en/sql/language-manual/data-types/int-type.md)
* [`BIGINT` type](https://docs.databricks.com/aws/en/sql/language-manual/data-types/bigint-type.md)
* [`DECIMAL` type](https://docs.databricks.com/aws/en/sql/language-manual/data-types/decimal-type.md)
* [`FLOAT` type](https://docs.databricks.com/aws/en/sql/language-manual/data-types/float-type.md)
* [`cast` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/cast.md)
* [Special floating point values](https://docs.databricks.com/aws/en/sql/language-manual/data-types/special-floating-point-values.md)
