Sql Server 学习之SELECT语句总结(一)
Sql Server 学习之SELECT语句总结(一) 查询处理的逻辑顺序 (返回结果列表( 01 ) FROM 表 表 (((((] SELECT语句的基本组件 Setp1:[FROM] from子句内可指定表的名称。在此步骤中,SQL Server会列出select语句使用的表,若指定join表则会一并列出,通 过交错
Sql Server 学习之SELECT语句总结(一)
查询处理的逻辑顺序
(返回结果列表(01) FROM 表 表 (((((]
SELECT语句的基本组件Setp1:[FROM]
from子句内可指定表的名称。在此步骤中,SQL Server会列出select语句使用的表,若指定join表则会一并列出,通 过交错排列的方式,将可能的组合放入VT1(第一个虚拟表内)。
Setp2:[ON]
比较VT1内的数据,当条件成立时将正确的的数据插入VT2。
Setp3:[Outer(join)]
如果定义了outer join 而非 cross join 或 inner join,即保存的表VT2内没有对应的记录依然会被当做外部记录
而形成VT3。如果from子句中表的个数超过两个,则setp1~3会在join的执行结果与from子句所标记的下一个表
间重复执行,直到所有的表处理完毕。
Setp4:[WHERE 过滤条件]
过滤VT3中的数据,将符合条件的列形成VT4。
Setp5: [Group by]
group by 子句可用于指定VT4的分组方式,执行的结果形成VT5。
Setp6:[CUBE|ROLLUP]
cube|rollup子句会对setp5中已经group by的数据在做进一步的group by 操作。如果将setp5比作数据的小计
值,服务器空间,那么setp6就是计算数据的总计值,而产生的数据会被插入到VT6。
Setp7: [HAVING]
判断VT6所完成的分组表中的字段是否符合having设置的条件。当符合该条件时,会将其插入到VT7。
Setp8: [SELECT]
通过select生成返回结果,仅选符合条件要求的字段列表生成VT8。
Setp9:[DISTINCT]
移除VT8的重复数据记录,香港服务器,将结果插入VT9。
Setp10:[Order by order_list [ASC|DESC] ]
指定VT9的排序方式(递增或递减),并将排序后的结果形成VT10。
Setp11:[TOP]
使用此关键字时,香港服务器,SQL SERVER会将VT10中符合条件的前n条数据插入到VT11,并返回给用户。
Setp12: [返回结果列表]
指定返回项目(如描述结果集的列,表达式,变量或常数),并以逗号分隔列表。
Setp13:[INTO新表名称]
可省略的自变量,方便用户以"返回结果列表"里的项目与数据类型结构创建新的表,并可使用"新表名称"所指定的
表名称。
posted on

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

WindowsServerBackup is a function that comes with the WindowsServer operating system, designed to help users protect important data and system configurations, and provide complete backup and recovery solutions for small, medium and enterprise-level enterprises. Only users running Server2022 and higher can use this feature. In this article, we will explain how to install, uninstall or reset WindowsServerBackup. How to Reset Windows Server Backup If you are experiencing problems with your server backup, the backup is taking too long, or you are unable to access stored files, then you may consider resetting your Windows Server backup settings. To reset Windows

Summary of the system() function under Linux In the Linux system, the system() function is a very commonly used function, which can be used to execute command line commands. This article will introduce the system() function in detail and provide some specific code examples. 1. Basic usage of the system() function. The declaration of the system() function is as follows: intsystem(constchar*command); where the command parameter is a character.

Asynchronous processing method of SelectChannelsGo concurrent programming using golang Introduction: Concurrent programming is an important area in modern software development, which can effectively improve the performance and responsiveness of applications. In the Go language, concurrent programming can be implemented simply and efficiently using Channels and Select statements. This article will introduce how to use golang for asynchronous processing methods of SelectChannelsGo concurrent programming, and provide specific

How to hide the select element in jquery: 1. hide() method, introduce the jQuery library into the HTML page, you can use different selectors to hide the select element, the ID selector replaces the selectId with the ID of the select element you actually use; 2. css() method, use the ID selector to select the select element that needs to be hidden, use the css() method to set the display attribute to none, and replace selectId with the ID of the select element.

On the occasion of releasing the build 26040 version of Windows Server, Microsoft announced the official name of the product: Windows Server 2025. Also launched is the Windows11WindowsInsiderCanaryChannel version build26040. Some friends may still remember that many years ago someone successfully converted Windows NT from workstation mode to server mode, showing the commonalities between various versions of Microsoft operating systems. Although there are clear differences between Microsoft's current version of the server operating system and Windows 11, those who pay attention to the details may be curious: why Windows Server updated the brand,

jQuery is a popular JavaScript library that can be used to simplify DOM manipulation, event handling, animation effects, etc. In web development, we often encounter situations where we need to change event binding on select elements. This article will introduce how to use jQuery to bind select element change events, and provide specific code examples. First, we need to create a dropdown menu with options using labels:

Because select allows developers to wait for multiple file buffers at the same time, it can reduce IO waiting time and improve the IO efficiency of the process. The select() function is an IO multiplexing function that allows the program to monitor multiple file descriptors and wait for one or more of the monitored file descriptors to become "ready"; the so-called "ready" state is Refers to: the file descriptor is no longer blocked and can be used for certain types of IO operations, including readable, writable, and exceptions. select is a computer function located in the header file #include. This function is used to monitor file descriptor changes—reading, writing, or exceptions. 1. Introduction to the select function. The select function is an IO multiplexing function.

How to modify the default name of nginx, you can disguise it a little, or you can install Tip: Generally, modifications are made before nginx is compiled. After modification, the code needs to be recompiled as follows: scr/core/nginx.conf#definenginx_version"1.4.7"#definenginx_ver"nginx/"n
