Alter table in access

Source: Internet
Author: User

ASP can be used to connect to an Access database.

1. "driver = {Microsoft Access Driver (*. mdb)}; DBQ = [database address]"

2. "provider = Microsoft. Jet. oledb.4.0; Data Source = [database address]"

The first connection method is "ansi SQL", and the second is the Microsoft Jet Database Engine. The Microsoft Jet Database Engine has few restrictions. For example, it allows grouping and sorting in expressions and provides more powerful expressions. For example, create table and alter table SQL statements that are frequently used in MS sqlserver databases to update data tables.

Therefore, we recommend that you use the second data connection method.

The following are some tips on using alter table today.

Syntax: alter table add column field type [(font length)] [not null] [default (values)] [constraint Index] |

Alter column field type [(font length)] |

Constraint multi-field index} |

Drop {Column field I constraint index name }}

The preceding syntax is from Microsoft Jet SQL reference, but the [default (values)] parameter is not found. In this experiment, the default value is valid.

Note that not null | null is case insensitive. Default is distinguished. The "default" in lower case is not the keyword of jet SQL and does not take effect.

Appendix: Microsoft Jet SQL reference, which is a good help document for access development and is recommended.

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.