---
title: "TO_BOOLEAN"
description: "TO_BOOLEAN SQL \uD568\uC218\uB294 \uAC12\uC744 boolean \uD615\uC73C\uB85C \uBCC0\uD658\uD569\uB2C8\uB2E4."
language: ko
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/ko/docs/invantive-universalsql/grammar/sql-functions/to-boolean
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/to-boolean
updated: 2026-12-04T14:36:44Z
license: https://documentation.invantive.eu/ko/
---

## 구문
```mermaid
%%{init: {
  'theme': 'base',
  'flowchart': { 'padding': '7', 'nodeSpacing': '20', 'rankSpacing': '20' },
  'themeVariables': {
    'fontSize': '11px',
    'fontFamily': 'Arial'
  }
}}%%
flowchart LR
    Start((START)) --> TO_BOOLEAN[TO_BOOLEAN]:::quoted
    TO_BOOLEAN --> End((END))
```

## 목적
`TO_BOOLEAN` SQL 함수는 값을 `boolean` 형으로 변환합니다. 형 변환할 수 없는 값은 오류를 발생시킵니다. 이런 오류를 방지하려면 먼저 [[IS_BOOLEAN]]을(를) 사용하여 값을 검사하십시오.

숫자의 경우 `0`은(는) `false`로 간주되고, 그 밖의 모든 값은 `true`으로 간주됩니다. 모든 `datetime`은(는) `false`입니다. 텍스트의 경우 다음 값들이 `true`으로 간주됩니다: `'true'`, `'t'`, `'yes'`, `'y'`, `'on'`, `'1'`, `'True'`, `'TRUE'`, `'T'`, `'YES'`, `'Y'` 및 `'ON'`. False are `'false'`, `'f'`, `'no'`, `'n'`, `'off'`, `'0'`, `'False'`, `'FALSE'`, `'F'`, `'NO'`, `'N'` and `'OFF'`.

매개변수:
- 입력(`ANY`): 변환할 값.

반환: `boolean` 형으로 변환된 입력값.

## 예시
다음 예제는 텍스트 `'true'`을(를) `boolean` 형으로 변환합니다:
```sql
select to_boolean('true')

----------------
true
```
다음 예제는 오류를 발생시킵니다:
```sql
select to_boolean('tr')

itgendid068: Invalid boolean value 'tr'.
```

