---
title: st_makepoint function
description: Learn the syntax of the st\_makepoint function of the SQL language in Databricks SQL and Databricks Runtime.
canonical_url: https://docs.databricks.com/gcp/en/sql/language-manual/functions/st_makepoint
---

# `st_makepoint` function

**Applies to:** ![check marked yes](https://docs.databricks.com/gcp/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/gcp/en/images/icons/check.png) Databricks Runtime 18.2 and above ![check marked yes](https://docs.databricks.com/gcp/en/images/icons/check.png) Lakehouse//RT

> [!NOTE]
>
> This feature is not available on Databricks SQL Classic warehouses. To learn more about Databricks SQL warehouses, see [SQL warehouse types](https://docs.databricks.com/gcp/en/compute/sql-warehouse/warehouse-types.md).

Returns a point `GEOMETRY` value with the given coordinates. The function takes 2, 3, or 4 `DOUBLE` values, representing the (x, y), (x, y, z), or (x, y, z, m) coordinates of the point.

## Syntax

```
st_makepoint ( x, y [, z [, m ] ] )
```

## Arguments

* `x`: A `DOUBLE` value, representing the first coordinate of the point.
* `y`: A `DOUBLE` value, representing the second coordinate of the point.
* `z`: An optional `DOUBLE` value, representing the third (Z) coordinate of the point.
* `m`: An optional `DOUBLE` value, representing the fourth (M) coordinate of the point.

## Returns

A value of type `GEOMETRY`, representing a point with the specified coordinates.

The SRID value of the returned geometry is always `0`.

The number of input coordinates determines the dimension of the returned point: 2D if you provide only `x` and `y`, 3DZ if you also provide `z`, or 4D if you provide all four coordinates (`x`, `y`, `z`, and `m`).

The function returns `NULL` if any of the inputs is `NULL`.

## Examples

```sql
-- Creates a 2D point with coordinates (10, 34).
> SELECT st_astext(st_makepoint(10.0, 34.0));
  POINT(10 34)
-- Creates a 3DZ point with coordinates (1, 2, 3).
> SELECT st_astext(st_makepoint(1.0, 2.0, 3.0));
  POINT Z (1 2 3)
-- Creates a 4D point with coordinates (1, 2, 3, 4).
> SELECT st_astext(st_makepoint(1.0, 2.0, 3.0, 4.0));
  POINT ZM (1 2 3 4)

-- The SRID of the returned geometry is always 0.
> SELECT st_srid(st_makepoint(10.0, 34.0));
  0
-- The type of the returned geometry is always geometry(0).
> SELECT typeof(st_makepoint(10.0, 34.0));
  geometry(0)

-- The function returns NULL if any of the inputs is NULL.
> SELECT st_astext(st_makepoint(10.0, NULL));
  NULL
```

## Related functions

* [`st_makeline` function](https://docs.databricks.com/gcp/en/sql/language-manual/functions/st_makeline.md)
* [`st_makepolygon` function](https://docs.databricks.com/gcp/en/sql/language-manual/functions/st_makepolygon.md)
* [`st_point` function](https://docs.databricks.com/gcp/en/sql/language-manual/functions/st_point.md)
