Ms-access-data-types
提供:Dev Guides
MS Access-データ型
テーブル内のすべてのフィールドにはプロパティがあり、これらのプロパティはフィールドの特性と動作を定義します。 フィールドの最も重要なプロパティは、そのデータ型です。 フィールドのデータ型によって、保存できるデータの種類が決まります。 MS Accessは、それぞれ特定の目的を持つさまざまなタイプのデータをサポートしています。
- データ型は、ユーザーが任意のフィールドに格納できる値の種類を決定します。
- 各フィールドには、単一のデータ型のみで構成されるデータを格納できます。
一般的なMicrosoft Accessデータベースで使用される最も一般的なデータ型の一部を以下に示します。
Type of Data | Description | Size |
---|---|---|
Short Text | Text or combinations of text and numbers, including numbers that do not require calculating (e.g. phone numbers). | Up to 255 characters. |
Long Text | Lengthy text or combinations of text and numbers. | Up to 63, 999 characters. |
Number | Numeric data used in mathematical calculations. | 1, 2, 4, or 8 bytes (16 bytes if set to Replication ID). |
Date/Time | Date and time values for the years 100 through 9999. | 8 bytes |
Currency | Currency values and numeric data used in mathematical calculations involving data with one to four decimal places. | 8 bytes |
AutoNumber | A unique sequential (incremented by 1) number or random number assigned by Microsoft Access whenever a new record is added to a table. | 4 bytes (16 bytes if set to Replication ID). |
Yes/No | Yes and No values and fields that contain only one of two values (Yes/No, True/False, or On/Off). | 1 bit. |
- 以前のバージョンのAccessを使用している場合、これらの2つのデータ型の違いに気付くでしょう。
- Access 2013には、ショートテキストとロングテキストの2つのデータタイプがあります。 Accessの以前のバージョンでは、これらのデータ型はテキストおよびメモと呼ばれていました。
- テキストフィールドはショートテキストと呼ばれ、メモフィールドはロングテキストと呼ばれます。
Accessで選択できる他のより特殊なデータ型の一部を次に示します。
Data Types | Description | Size |
---|---|---|
Attachment | Files, such as digital photos. Multiple files can be attached per record. This data type is not available in earlier versions of Access. | Up to about 2 GB. |
OLE objects | OLE objects can store pictures, audio, video, or other BLOBs (Binary Large Objects) | Up to about 2 GB. |
Hyperlink | Text or combinations of text and numbers stored as text and used as a hyperlink address. | Up to 8,192 (each part of a Hyperlink data type can contain up to 2048 characters). |
Lookup Wizard |
The Lookup Wizard entry in the Data Type column in the Design view is not actually a data type. When you choose this entry, a wizard starts to help you define either a simple or complex lookup field. 単純なルックアップフィールドは、別のテーブルまたは値リストの内容を使用して、行ごとに1つの値の内容を検証します。 複雑なルックアップフィールドを使用すると、各行に同じデータ型の複数の値を格納できます。 |
Dependent on the data type of the lookup field. |
Calculated | You can create an expression that uses data from one or more fields. You can designate different result data types from the expression. | You can create an expression that uses data from one or more fields. You can designate different result data types from the expression. |
これらはすべて、Microsoft Accessテーブルにフィールドを作成するときに選択できるさまざまなデータ型です。