Home > Topics > Access > Access data types

Access data types

藏色散人
Release: 2020-09-17 14:04:59
Original
79593 people have browsed it

Access has 10 data types, namely: 1. Text type; 2. Currency type; 3. Numeric type; 4. Date and time type; 5. Automatic numbering type; 6. Whether type; 7 , Remark type; 8. OLE object type; 9. Hyperlink type; 10. Query wizard type.

Access data types

Access database provides 10 data types for fields. Their usage and storage space size are as follows:

1. Text: used to enter text or data combining text and numbers. The maximum length is 255 characters (bytes). The default value is 50. In Access, each Chinese character and all special characters (including Chinese punctuation marks) count as one character.

Method of expression: enclosed in English single quotation marks (’ ’) or British double quotation marks (” ”). Examples: 'Wang Gang', 'Accounting Class 2', '3246291', etc.

2. Currency: used to store currency values, occupies 8 bytes, and rounding is prohibited in calculations.

3. Number: used for data that can be numerically calculated, except currency. Numeric fields are divided into 7 types according to field size: byte, integer, long, single precision, double precision, synchronous replication ID and decimal, accounting for 1, 2, 4, 4, 8, 16 and 12 respectively. byte.

Method of expression: just write directly. Example: 3246291

4. Date/Time type (Date/Time): used to store date and/or time values, occupying 8 bytes.

Representation method: enclosed in English characters #. Example: #2010-02-25#, #02/25/2010#, #2010-02-25 15:30#, #2010-02-25 3:30pm#, #15:30# are all legal expressions method. But be careful: there must be a space between the date and time.

5. AutoNumber: A serial number used to automatically insert when adding a record (incrementing by 1 or a random number each time). The default is a long integer, which can also be changed to a synchronous replication ID. Automatic numbering cannot be updated.

6. Yes/No type (Yes/No): used to represent logical values ​​(yes/no, true/false), occupying 1 byte.

Method of expression: .T. .F. True false

7. Memo type (Memo): used for long text or a combination of long text and numbers (more than 255 characters), with a maximum length of 65535 characters.

8. OLE Object: used for OLE objects created in other programs using the OLE protocol (such as Word documents, Excel spreadsheets, pictures, sounds, etc.), with a maximum storage capacity of 1GB (limited by disk space).

9. Hyper Link: used to store hyperlink addresses, with a maximum of 64,000 characters.

10. Lockup Wizard: Allows the user to select values ​​from other tables or value lists through a combo box or list box. The actual field type and length depend on the source of the data.

The above is the detailed content of Access data types. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template