---
title: "SIGN"
description: "SIGN SQL\u95A2\u6570\u306F\u3001\u6570\u5024\u306E\u7B26\u53F7\u3092\u8FD4\u3057\u307E\u3059\u3002\u8CA0\u306E\u6570\u306F-1\u3001\u6B63\u306E\u6570\u306F1\u3001\u30BC\u30ED\u306F0\u3067\u8868\u3055\u308C\u307E\u3059\u3002"
language: ja
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/ja/docs/invantive-universalsql/grammar/sql-functions/sign
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/sign
updated: 2026-12-04T14:25:43Z
license: https://documentation.invantive.eu/ja/
---

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

## 目的
`SIGN` SQL関数は、数値の符号を返します。負の数は-1、正の数は1、ゼロは0で表されます。

参照：[[ABS]]。

パラメータ:
- 入力 (`decimal`): 数値。

戻り値: 符号（`int32`型）。

## 例
次の例では、負の数、ゼロ、正の数の符号を取得します：
```sql
select sign(-0.65565) negative
,      sign(0) neutral
,      sign(+20) positive

-------- -------- --------
-1       0        1
```
次の例では、入力が`null`であるため、`null`を返します：
```sql
select sign(null)

--------

```

