DISTANCESQUARED()

Scalar. Returns a number representing the square of the distance between two points in either two or three dimensions.

Syntax

DISTANCESQUARED( point1x, point1y [, point1z], point2x, point2y [, point2z] )
Parameters

point1x

An expression that evaluates to a value representing the position of the first point on the x axis.

point1y

An expression that evaluates to a value representing the position of the first point on the y axis.

point1z

An expression that evaluates to a value representing the position of the first point on the z axis.

point2x

An expression that evaluates to a value representing the position of the second point on the x axis.

point2y

An expression that evaluates to a value representing the position of the second point on the y axis.

point2z

An expression that evaluates to a value representing the position of the second point on the z axis.

Data Types

Return

point1x

point1y

point1z

point2x

point2y

point2z

Integer

Integer

Integer

Integer

Integer

Integer

Integer

Long

Long

Long

Long

Long

Long

Long

Float

Float

Float

Float

Float

Float

Float

Example

INSERT INTO OutStream
SELECT DISTANCESQUARED(4.7, 5.75, 2.1, 6.33)
FROM InStream;