Create and delete tables in an Access database with SQL statements; Add columns and delete columns

Source: Internet
Author: User
Tags access database

Create and delete tables in an Access database with SQL statements; Add columns and delete columns posted on2009-08-11 13:42 Yunbo Read (1240) Comments (0) Edit Collection

Create and delete tables in an Access database with SQL statements; Add columns and delete columns
SQL statements, see Help for specific use methods

Create Table tab1 (Fld1 integer)
Drop Table TAB1

Alter Table tab1 Add COLUMN col1 Integer
Alter Table tab1 Drop COLUMN col1

2
Set up a data table
CREATE table data table name (field name 1 data type 1 (data length), Field name 2 data type 2 (data length),...)

Delete a data table
drop table Data table name

Edit Data table
Add Field
ALTER TABLE data table name add field name data type (data length)

Delete a field
ALTER TABLE data table name drop field name

Field renaming
There is no direct rename statement, but can be implemented by first deleting and then adding the method


3
Set up a data table
CREATE table data table name (field name 1 data type 1 (data length), Field name 2 data type 2 (data length),...)

Delete a data table
drop table Data table name

Edit Data table
Add Field
ALTER TABLE data table name add field name data type (data length)

Delete a field
ALTER TABLE data table name drop field name
ALTER TABLE Table1 ADD COLUMN newcol TEXT (Ten) DEFAULT ' ABC

Create and delete tables in an Access database with SQL statements; Add columns and delete columns

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.