SQL Language---3

Source: Internet
Author: User

Database definition

I. Basic domain type: char,varchar,int,smallint,nimeric,real,double precision,float,boolean,date,time

Second, create a table

Statement format: creat table< table name > ...

Third, modify, delete the table

1. Modify: Alter table< table name >

2. Delete: Drop table< table name >

Iv. Creating and deleting indexes

1. Index classification: Clustered index, nonclustered index

2. Create: creat [unique][cluster][inddex< index name >ON< table name;]

(1) Order: ASC Ascending DSC Descending default value ascending

(2) Unique indicates that this index value corresponds to a unique data record

(3) CLUSTER clustered index

3. Delete: Drop index< index name >

V. Creation and deletion of views

1. Create: creat view name (list) as SELECT query clause [with CHECK OPTION]

2. Delete: Drop view name

SQL Language---3

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.