> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ULID를 처리하는 데 사용하는 함수에 대한 문서

# ULID를 처리하는 함수

<Note>
  아래 문서는 `system.functions` 시스템 테이블을 기반으로 생성되었습니다.
</Note>

{/*AUTOGENERATED_START*/}

<div id="ULIDStringToDateTime">
  ## ULIDStringToDateTime
</div>

도입 버전: v23.3.0

이 함수는 [ULID](https://github.com/ulid/spec)에서 타임스탬프를 추출합니다.

**구문**

```sql theme={null}
ULIDStringToDateTime(ulid[, timezone])
```

**인수**

* `ulid` — 입력으로 사용할 ULID입니다. [`String`](/ko/reference/data-types/string) 또는 [`FixedString(26)`](/ko/reference/data-types/fixedstring)
* `timezone` — 선택 사항입니다. 반환 값에 사용할 시간대 이름입니다. [`String`](/ko/reference/data-types/string)

**반환 값**

밀리초 정밀도의 타임스탬프입니다. [`DateTime64(3)`](/ko/reference/data-types/datetime64)

**예시**

**사용 예시**

```sql title=Query theme={null}
SELECT ULIDStringToDateTime('01GNB2S2FGN2P93QPXDNB4EN2R')
```

```response title=Response theme={null}
┌─ULIDStringToDateTime('01GNB2S2FGN2P93QPXDNB4EN2R')─┐
│                            2022-12-28 00:40:37.616 │
└────────────────────────────────────────────────────┘
```

<div id="generateULID">
  ## generateULID
</div>

도입 버전: v23.2.0

[Universally Unique Lexicographically Sortable Identifier (ULID)](https://github.com/ulid/spec)를 생성합니다.

**구문**

```sql theme={null}
generateULID([x])
```

**인수**

* `x` — 선택 사항입니다. 지원되는 데이터 타입 중 하나의 값을 생성하는 표현식입니다. 생성된 값은 버려지지만, 하나의 쿼리에서 함수를 여러 번 호출하는 경우 표현식 자체는 [common subexpression elimination](/ko/reference/functions/regular-functions/overview#common-subexpression-elimination)을 우회하는 데 사용됩니다. [`Any`](/ko/reference/data-types)

**반환 값**

ULID를 반환합니다. [`FixedString(26)`](/ko/reference/data-types/fixedstring)

**예시**

**사용 예시**

```sql title=Query theme={null}
SELECT generateULID()
```

```response title=Response theme={null}
┌─generateULID()─────────────┐
│ 01GNB2S2FGN2P93QPXDNB4EN2R │
└────────────────────────────┘
```

**한 행에서 여러 값을 생성해야 할 때의 사용 예시**

```sql title=Query theme={null}
SELECT generateULID(1), generateULID(2)
```

```response title=Response theme={null}
┌─generateULID(1)────────────┬─generateULID(2)────────────┐
│ 01GNB2SGG4RHKVNT9ZGA4FFMNP │ 01GNB2SGG4V0HMQVH4VBVPSSRB │
└────────────────────────────┴────────────────────────────┘
```

<div id="see-also">
  ## 관련 항목
</div>

* [UUID](/ko/reference/functions/regular-functions/uuid-functions)
