---
title: "LN"
description: "LN SQL\u95A2\u6570\u306F\u3001\u6570\u5024\u306E\u81EA\u7136\u5BFE\u6570\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002"
language: ja
source_language: en
translation_state: complete
canonical: https://documentation.invantive.eu/ja/docs/invantive-universalsql/grammar/sql-functions/ln
original: https://documentation.invantive.eu/en/docs/invantive-universalsql/grammar/sql-functions/ln
updated: 2026-12-04T13:54:55Z
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)) --> LN[LN]:::quoted
    LN --> End((END))
```

## 目的
`LN` SQL関数は、数値の自然対数を取得します。 [[LOG]]とは異なり、底は指定できません。底は常に数値`e`です。

関連項目：[[LOG]]および[[EXP]]。

パラメータ:
- 入力（`decimal`）：自然対数を取得する数値。

戻り値: 入力の自然対数。

## 例
次の例では、1の自然対数を取得します：
```sql
select ln(1)

-------------------
0
```
次の例では、数値 e の自然対数を取得します：
```sql
select ln(exp(1))

-------------------
1
```

