Special SQL usage in MySQL

Source: Internet
Author: User

As database software, mysql and Oracle are both based on standard SQL, but there are still some similarities and differences. Here we will list the differences:

1. limit (note that the row number starts from 0)

Limit 4th: the first digit indicates the row number, and the second digit indicates the number of rows of data returned. This indicates that four rows of data are returned starting from the second row (the row number starts from 0.

Limit 3 offset 4: Take 3 rows from Row 4, where the row number starts from 0

2. where col = 'abc' is the same as where col = 'abc'. Matching is case-insensitive, including =, <>

3. Character concatenation. function: concat ([Character List])

4. functions such as avg, max, min, and sum ignore NULL columns.

5. insert multiple entries:

You can use:

Insert into table (col1, col2)

Values (p_11, p_12), (p_21, p_22 );

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.