Summary of SQL FOCUS statements

Source: Internet
Author: User

SQL statements are case insensitive

1, select Column name from table name//The statement if there are multiple fields, need to be separated by commas, the order of the fields in the SELECT statement determines the order of the field display of the query results; field names allow duplicates

2. Select DISTINCT column name from table name//distinct If there are multiple field names, then multiple fields are not duplicated

3, SELECT column name from table name WHERE column operator value//The value in the statement if it is a text type, you need to use single quotation marks, if it is a numeric type, do not use quotation marks

4. SELECT column name from table name order BY//default in ascending order (ASC), in descending order, you need to manually specify DESC

5. INSERT into table_name (column 1, column 2,...)  Values (value 1, value 2,....) By default, values are added to all fields when the column name is omitted

6. UPDATE Table name SET column name = new value WHERE Column name = value//update statement used to modify data in table

7. DELETE from table name WHERE column name = value//

Summary of SQL FOCUS statements

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.