2015/4/10 SQL database Additions and deletions

Source: Internet
Author: User
Increase

1.insert Insertion

Syntax:insert[into]< table name >[column name]values< column value >

Cases:

Insert into Student (name, gender, date of birth) values (' Wang Weihua ', ' Male ', ' 1983/6/18 ')

2. Inserting a table

Syntax: Insert into< existing new table >< column name >select< original table column name >from< original table name >

Example: INSERT into AddressList (' name ', ' address ', ' email ') Select Name,address,email from students

By deleting

1.delete

Syntax: Delete from table name where column name =[column value]

Example: Delete from student where name= ' Wang Weihua '

2.truncate

Syntax:truncate< table name >

Change

1.update

Syntax:update< table name >set< column name = new value >where< Update condition >

Example: Update AddressList set age =18 where name = ' Wang Weihua '

Check

Select

Syntax:select< column name >from< table name >[where< query condition expression >][order by< sort column name >[ASC or DESC]]

2015/4/10 SQL database Additions and deletions

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.