Create a table in access and specify the field type

Source: Internet
Author: User

Creating a table in access generally uses ADO to execute SQL statements to create a table. What is the field type in access in SQL statements? There is an article in msdnArticleDetailed introduction:

Http://msdn.microsoft.com/office/understanding/access/codesamples/default.aspx? Pull =/library/en-US/dnacc2k/html/acintsql. asp

The following is an SQL statement I wrote. It is successfully executed using the adoconnection object in Delphi:
Create Table Test Table (
The text 255 varchar not null,
Text 20 varchar (20) not null,
Datetime,
Number 1 byte,
Number 2 smallint,
Number 4 integer,
Boolean,
Automatically numbered counter (10, 5) Constraint pk_tviplevel26 primary key,
Fractional numeric,
Single precision real,
Double precision float default 0 not null,
Note: memo,
Currency,
OLE object image)

In the access query designer, this statement cannot be executed by default 0;
where: Counter () indicates that the initial value starts from 10 and increases by 5 each time, if there is no (), it starts from 1 and increases by 1 each time;
numeric indicates decimal, you can use numeric () to specify two decimal places;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.