Condividi tramite


STEquals (tipo di dati geometry)

Si applica a:SQL ServerDatabase SQL di AzureIstanza gestita di SQL di AzureDatabase SQL in Microsoft Fabric

Restituisce 1 se un'istanza geometry rappresenta lo stesso set di punti di un'altra istanza geometry. In caso contrario, restituisce 0.

Syntax

  
.STEquals ( other_geometry )  

Arguments

other_geometry
Altra istanza geometry da confrontare con l'istanza sulla quale viene chiamato STEquals().

Tipi restituiti

Tipo SQL Server restituito: bit

Tipo CLR restituito: SqlBoolean

Remarks

Questo metodo restituisce sempre Null se gli identificatori SRID delle istanze geometry non corrispondono.

Examples

Nell'esempio seguente viene usato il metodo geometry per creare due istanze STGeomFromText() uguali in modo non banale e viene usato STEquals() per verificarne l'uguaglianza.

DECLARE @g geometry  
DECLARE @h geometry;  
SET @g = geometry::STGeomFromText('LINESTRING(0 2, 2 0, 4 2)', 0);  
SET @h = geometry::STGeomFromText('MULTILINESTRING((4 2, 2 0), (0 2, 2 0))', 0);  
SELECT @g.STEquals(@h);  

Vedere anche

Panoramica degli indici spaziali
Metodi OGC sulle istanze di geometria