MySQL (iv)--records in the operational data sheet

Source: Internet
Author: User

  • Inserting records
    • INSERT [ into]Tbl_name[(col_name,...)]{VALUES |VALUE} ({expr| DEFAULT},...),(...),...//Law Two: The difference is that this method can use subqueries (subquery)INSERT [ into]Tbl_nameSET col_name={Expr|DEFAULT},...//method Three: This method can insert the query result into the specified data tableINSERT [ into]Tbl_name[(col_name,...)] SELECT...
  • Update record (single table update)
    •  update  [ Span style= "color: #ff0000;" >low-priority   [ ignore   table_reference set  Span style= "color: #000000;" >col_name1  =  {expr1|  default } [ ,col_name2 = {expr2| DEFAULT}     ...  [ where where_condition  ]
  • Delete Record (single table Delete)
    • DELETE  from [WHERE where_condition]
  • Find Records
    • SELECTselect_expr[, select_expr ...][From table-references [WHERE where_condition]    [GROUP by {col_name | position} [asc| DESC], ...] [Having where_condition]    [ORDER by {col_name | expr | position} [asc| DESC], ...] [LIMIT {[Offset,]Row_count|row_count offset (offset}] ]
    • Each expression expresses the desire for a column, which must be at least one;
    • Comma-equal between multiple columns;
    • A query expression can use [as] alias_name to give it an alias;
  • Conditional expression--where
    • Filter the record, and if no WHERE clause is specified, all records are displayed;
    • In the where expression, you can use the functions or operators supported by MySQL.
  • Query result grouping--group by
  • Grouping conditions--having
  • Limit the number of query results returned--LIMIT

MySQL (iv)--records in the operational data sheet

Related Article

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.