SQL statement execution sequence

Source: Internet
Author: User

Hello everyone, our database has been introduced. Here is a summary. We learned how to add, delete, modify, and query SQL statements in this section. query is our focus. We will take a look at SQL statements learned by SQL Server 2005, graphical operations on SQL Server, and views and database backup and restoration. We have already learned SQL statements about Oracle, so Oracle has actually learned more than half of them. Next we will learn about Oracle by myself. We will mainly look at its concept, oracle and SQL Server are quite different. They are familiar with the concept of table space, their graphical interfaces, and backup and recovery operations. If you want to continue learning, take a look at the Oracle video from MLDN instructor Li Xinghua. Let's take a look at Oracle9i reference manual.
Well, in my summary today, I want to introduce the execution sequence of SQL statements (mainly Select). Once I understand this, I can see why there is no aggregate function in where. I drew a picture, but it is not very good.

From this perspective, we can see why the where clause cannot contain aggregate functions, because SQL first executes the where clause and then executes the aggregate function. If the where clause contains Aggregate functions, at this time, the aggregate function has not been executed, and there is no result for where to use. Let's take a good look at this picture.

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.