Home > Topics > Access > Introduction to access common fields

Introduction to access common fields

王林
Release: 2021-02-01 15:56:44
forward
7843 people have browsed it

Introduction to access common fields

The following is a description of common fields in the access database:

BINARY - each character occupies 1 byte. Any type of data can be stored in this type in the field. No data conversion (for example, to text) is performed. How data is input into a binary field is displayed as output

BIT - 1 byte with values ​​of Yes and No, and the field can only take one of these two values.

TINYINT - 1 byte integer value between 0 and 255.

MONEY - 8 bytes Adjustable integer between –922,337,203,685,477.5808 and 922,337,203,685,477.5807.

DATETIME (see DOUBLE) – 8 bytes A date or time value between the years 100 and 9999.

UNIQUEIDENTIFIER - 128 bits A unique identification number used for remote procedure calls.

REAL —— 4 bytes single-precision floating point value, negative values ​​from – 3.402823E38 to – 1.401298E-45, positive values ​​from 1.401298E-45 to 3.402823E38, and zero.

FLOAT - 8 bytes double precision floating point value, negative values ​​from - 1.79769313486232E308 to - 4.94065645841247E-324, positive values ​​from 4.94065645841247E-324 to 1.79769313486232E308, and zero .

SMALLINT - 2 bytes short integer between – 32,768 and 32,767.

INTEGER - 4 bytes long integer between – 2,147,483,648 and 2,147,483,647.

DECIMAL - 17 bytes Exact numeric data type, ranging from 1028 - 1 to - 1028 - 1. You can define the precision (1 - 28) and size (0 -- defines the precision). The default precision and size are 18 and 0 respectively.

TEXT — 2 bytes per character (see Note) Zero to maximum 2.14 gigabytes (GB).

IMAGE - as needed from zero to a maximum of 2.14 gigabytes. Used for OLE objects.

CHARACTER——Each character occupies 2 bytes (see "Note") From zero to 255 characters

In the Java programming language, how to create Access fields.

 ●BINARY (binary type): If you manually create table fields in Access, you cannot find this type. There are two keywords for creating this data field using Java language programming: BINARY and VARBINARY. You can choose any one.

 ●BIT (yes/no type): There are 4 keywords to use Java language programming to create this data field: BIT, LOGICAL, LOGICAL1, YESNO, you can choose any one.

 ●TINYINT (number, byte type): There are two programming keywords: INTEGER1, BYTE, you can choose any one.

 ●MONEY (currency type): There are two programming keywords: MONEY and CURRENCY. You can choose any one.

 ●DATETIME (date/time type): There are 4 programming keywords: DATETIME, DATE, TIME, TIMESTAMP, you can choose any one.

 ●UNIQUEIDENTIFIER (numeric synchronous copy ID type): There is 1 programming keyword: GUID.

 ●REAL (numeric single precision type): There are 4 programming keywords: REAL, SINGLE, FLOAT4, IEEESINGLE, you can choose any one.

 ●FLOAT (numeric double precision type): There are 6 programming keywords: NUMERIC, FLOAT, DOUBLE, FLOAT8, IEEEDOUBLE, NUMBER. You can choose any one.

SMALLINT (numeric integer type): There are three programming keywords: SMALLINT, SHORT, INTEGER2, you can choose any one.

 ●INTEGER (numeric long integer type): There are 4 programming keywords: INTEGER, LONG, INT, INTEGER4, you can choose any one. Note that Access's long integer is 4 bytes, not 8 bytes.

DECIMAL (decimal) In the Access Help "Equivalent ANSI SQL Data Types", the synonymous keyword for defining DECIMAL is NUMERIC, but when using NUMERIC, the field type is double precision. .

●TEXT (remarks) There are 4 programming keywords: LONGTEXT, LONGCHAR, MEMO, NOTE, you can choose any one.

●IMAGE (OLE object) There are 4 programming keywords: IMAGE, GENERAL, LONGBINARY, OLEOBJECT, you can choose any one.

●CHARACTER (text) Programming keywords are: TEXT(n), CHAR(n), ALPHANUMERIC(n), STRING(n), VARCHAR(n), you can choose any one. Note that (1) n cannot be greater than 255; (2) When only the TEXT keyword is used, the default size is 255.

●Automatic numbering: There are two programming keywords: COUNTER and AUTOINCREMENT, you can choose any one.

Related recommendations: access database tutorial

The above is the detailed content of Introduction to access common fields. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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
Latest Issues
Access error using alias
From 1970-01-01 08:00:00
0
0
0
Single module access
From 1970-01-01 08:00:00
0
0
0
About Mac MAMP PRO deploy thinkphp5.1 access 404
From 1970-01-01 08:00:00
0
0
0
Can't access page
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template