# ST_AppendPoint function

The ST_AppendPoint function takes a curve and a point as input parameters and extends the curve by the given point. If the given curve has Z or M coordinates, then the point must also have Z or M coordinates. The resulting curve is represented in the spatial reference system of the given curve.

If the point to be appended is not represented in the same spatial reference system as the curve, it will be converted to the other spatial reference system.

If the given curve is closed or simple, the resulting curve might not be closed or simple anymore. If the given curve or point is null, or if the curve is empty, then null is returned. If the point to be appended is empty, then the given curve is returned unchanged and a warning is raised (SQLSTATE 01HS3).

This function can also be called as a method.

## Syntax

## Parameter

- curve
- A value of type ST_Curve or one of its subtypes that represents
the curve to which
*point*will be appended. - point
- A value of type ST_Point that represents the point that is appended
to
*curve*.

## Return type

db2gse.ST_Curve

## Examples

In the following examples, the lines of results have been reformatted for readability. The spacing in your results will vary according to your online display.

```
SET CURRENT FUNCTION PATH = CURRENT FUNCTION PATH, db2gse
CREATE TABLE sample_lines(id integer, line ST_Linestring)
INSERT INTO sample_lines VALUES
(1, ST_LineString('linestring (10 10, 10 0, 0 0 )', 0) )
INSERT INTO sample_lines VALUES
(2, ST_LineString('linestring z (0 0 4, 5 5 5, 10 10 6)', 0) )
```