SQL Basic Query Notes

Source: Internet
Author: User

Operational sequencing
From
On
Join
where
GROUP BY
With cube or with rollup not
Having
Select
Distinct
ORDER BY
Top

Select *from ... Querying all data

A convenient process for filtering data

Start position from =c# foreach where filter condition =foreach{loop body If judgment} Select mapping Transcription * Copy line Select to last run from middle

Top

How many bars before filtering

Select top 2 *from ... where: Like '%.. %‘
Top Last Run
Like fuzzy query% _ [] [^]

_ occupies one character in a position that can be any character
[] In this character position can be any one of the brackets within the range
[^] not within the range

SLELCT distinct (de-weight) brand from.
Distinct after Select

Select *from. ORDER BY:
Order by sort default from low to high ASC (can not be written) Ascending desc Descending
Behind the select top in order BY

Where behind filter
Compare operators < > <= >=! =
Logical operator and OR

Select *from. Where: Like: and.. <, ....

SQL Basic Query Notes

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.