Home >Database >Mysql Tutorial >SQL学习笔记八 索引,表连接,子查询,ROW_NUMBER

SQL学习笔记八 索引,表连接,子查询,ROW_NUMBER

WBOY
WBOYOriginal
2016-06-07 18:02:161053browse

SQL学习笔记八 索引,表连接,子查询,ROW_NUMBER,学习sqlserver的朋友可以看下。

索引

经常要查询的语句,则给它建一个索引

表连接

select T_Oders as o join T_Customers as C on o.CustomerId = c.Id

子查询

单值子查询

单列多值子查询


ROW_NUMBER()函数

ROW_NUMBER() OVER(ORDER BY Fsalary DESC)
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn