6.SQL Server SQL statements

Source: Internet
Author: User

1.Select Query

SELECT * from users queries the user table for all information

Select Name,age as age from users Where name= ' Zhangsan ' and age=10 increase query conditions

Select A to UserInfo results insert into a new table

Select name from the users order by age desc, Num desc sort desc Descending asc Ascending

GROUP BY group query AVG (column name) average Coung () Total row

Group queries based on different employee categories how many people belong to different employee classes

Select COUNT (*) as total, employee category from the Users group by employee category

Group by has two keywords cube and rollup

2.Select function

6.SQL Server SQL statements

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.