> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# ST_SRID

> 返回原生 GEOMETRY 描述符中的数字 EPSG SRID。

返回原生 `GEOMETRY` 的 CRS 对应的数字 SRID。`OGC:CRS84` 对应 4326。如果 CRS 没有明确的数字 EPSG 映射，则返回 `NULL`，不会使用 EPSG:0 代替。

## 语法

```sql theme={null}
INT ST_SRID(GEOMETRY value)
```

输入为 `NULL` 时返回 `NULL`。此函数仅读取元数据，不转换坐标。不接受 `GEOGRAPHY`。

## 示例

```SQL theme={null}
SELECT ST_SRID(ST_GeomFromText('POINT (10 20)', 'EPSG:4326'));
-- 4326
```

## 关键词

ST\_SRID, GEOMETRY, CRS, EPSG

## 相关数据类型

[GEOMETRY](/documents/cn/4.2/sql-reference/data-types/spatial-types/GEOMETRY.md), [INT](/documents/cn/4.2/sql-reference/data-types/numeric/INT.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.