SQLチュートリアル

SQL HOME SQLイントロ SQL構文 SQL Select SQL Select Distinct SQL Where SQL And、Or、Not SQLの順序 SQL Insert Into SQLNull値 SQLアップデート SQL削除 SQL Select Top SQLの最小値と最大値 SQLカウント、平均、合計 SQL Like SQLワイルドカード SQL入力 SQLの間 SQLエイリアス SQL結合 SQL内部結合 SQL左結合 SQL右結合 SQL完全結合 SQL自己結合 SQLユニオン SQL Group By SQLを持っている SQLが存在する SQL Any、All SQL Select Into SQL Insert Into Select SQLケース SQLNull関数 SQLストアドプロシージャ SQLコメント SQL演算子

SQLデータベース

SQL Create DB SQLドロップDB SQLバックアップDB SQLテーブルの作成 SQLドロップテーブル SQL ALTER TABLE SQLの制約 SQLはNullではありません SQL独自 SQL主キー SQL外部キー SQLチェック SQLのデフォルト SQLインデックス SQL自動インクリメント SQLの日付 SQLビュー SQLインジェクション SQLホスティング SQLデータ型

SQLリファレンス

SQLキーワード MySQL関数 SQLServerの機能 MSAccess関数 SQLクイック参照

SQLの

SQLの例 SQLクイズ SQL演習 SQL証明書

MS Access Format()関数

❮MSAccess関数

数式をパーセントにフォーマットします。

SELECT Format(0.5, "Percent") AS FormattedNum;

定義と使用法

Format()関数は、指定された形式で数値をフォーマットします。

構文

Format(value, format)

パラメータ値

Parameter Description
value Required. The numeric value to format
format Optional. The format to to use.
Format Description
General Number Indicates a number, without thousand separators
Currency Indicates currency, with thousand separators and two decimal places
Fixed Shows minimum one digit to the left of the decimal place and two digits to the right of the decimal place
Standard Shows the thousand separators + minimum one digit to the left of the decimal place, and two digits to the right of the decimal place
Percent Shows a percent value (with percent sign) and two digits to the right of the decimal place
Scientific Indicates scientific notation
Yes/No Shows No if value = 0 and Yes if value <> 0
True/False Shows False if value = 0 and True if value <> 0
On/Off Shows Off if value = 0 and On if value <> 0

技術的な詳細

で動作します: Access2000から

その他の例

「価格」列を通貨にフォーマットします。

SELECT Format(Price, "Currency") AS FormattedPrice
FROM Products;

❮MSAccess関数