📣新登場!TiDB Cloud BYOC、TiDB Cloud Filesystem、PostgreSQL-compatible TiDB Cloud Starter がパブリックプレビュー中。このページは自動翻訳されたものです。原文はこちらからご覧ください。

MULTIPLY



MULTIPLY 関数は 2 つの数値の乗算を実行します。これは * 演算子を使用するのと同等です。

構文

MULTIPLY(x, y) -- Or using the operator syntax x * y

引数

引数説明
x, y乗算する数値式です。

戻り値の型

入力引数に基づいて適切なデータ型の数値を返します。

例

-- Using the function syntax SELECT MULTIPLY(5, 3); +----------------+ | MULTIPLY(5, 3) | +----------------+ | 15 | +----------------+ -- Using the operator syntax SELECT 5 * 3; +-------+ | 5 * 3 | +-------+ | 15 | +-------+ -- With decimal numbers SELECT MULTIPLY(2.5, 4); +------------------+ | MULTIPLY(2.5, 4) | +------------------+ | 10.0 | +------------------+ -- With column references SELECT number, MULTIPLY(number, 10) AS multiplied FROM numbers(5); +--------+------------+ | number | multiplied | +--------+------------+ | 0 | 0 | | 1 | 10 | | 2 | 20 | | 3 | 30 | | 4 | 40 | +--------+------------+

関連情報

このページは役に立ちましたか?