sql注入语句示例大全

Order By is a SQL command that lets you sort the resulting output from a SQL query.

Order By是一个SQL命令,可让您对SQL查询的结果输出进行排序。

订购依据(ASC,DESC) (Order By (ASC, DESC))

ORDER BY gives us a way to SORT the result set by one or more of the items in the SELECT section. Here is an SQL sorting the students by FullName in descending order. The default sort order is ascending (ASC) but to sort in the opposite order (descending) you use DESC.

ORDER BY提供了一种对SELECT部分​​中一个或多个项目的结果集进行排序的方法。 这是一个按FullName降序对学生进行排序SQL。 默认的排序顺序为升序(ASC),但要使用相反的顺序(降序),请使用DESC。

Here's the query

这是查询

SELECT studentID, FullName, sat_score
FROM student
ORDER BY FullName DESC;

And here's the resulting data, presented in a nice descending table.

这是结果数据,以漂亮的降序表显示。

+-----------+------------------------+-----------+
| studentID | FullName               | sat_score |
+-----------+------------------------+-----------+
|         2 | Teri Gutierrez         |       800 |
|         3 | Spencer Pautier        |      1000 |
|         6 | Sophie Freeman         |      1200 |
|         9 | Raymond F. Boyce       |      2400 |
|         1 | Monique Davis          |       400 |
|         4 | Louis Ramsey           |      1200 |
|         7 | Edgar Frank "Ted" Codd |      2400 |
|         8 | Donald D. Chamberlin   |      2400 |
|         5 | Alvin Greene           |      1200 |
+-----------+------------------------+-----------+
9 rows in set (0.00 sec)

Here is the UN-ORDERED, current, full student list to compare to the above.

这是与上述内容比较的未排序,当前的完整学生列表。

SELECT studentID, FullName, sat_score, rcd_updated FROM student;
+-----------+------------------------+-----------+---------------------+
| studentID | FullName               | sat_score | rcd_updated         |
+-----------+------------------------+-----------+---------------------+
|         1 | Monique Davis          |       400 | 2017-08-16 15:34:50 |
|         2 | Teri Gutierrez         |       800 | 2017-08-16 15:34:50 |
|         3 | Spencer Pautier        |      1000 | 2017-08-16 15:34:50 |
|         4 | Louis Ramsey           |      1200 | 2017-08-16 15:34:50 |
|         5 | Alvin Greene           |      1200 | 2017-08-16 15:34:50 |
|         6 | Sophie Freeman         |      1200 | 2017-08-16 15:34:50 |
|         7 | Edgar Frank "Ted" Codd |      2400 | 2017-08-16 15:35:33 |
|         8 | Donald D. Chamberlin   |      2400 | 2017-08-16 15:35:33 |
|         9 | Raymond F. Boyce       |      2400 | 2017-08-16 15:35:33 |
+-----------+------------------------+-----------+---------------------+
9 rows in set (0.00 sec)

As with all of these SQL things there is MUCH MORE to them than what’s in this introductory guide.

与所有这些SQL事物一样,它们比本入门指南中的内容要多得多。

I hope this at least gives you enough to get started.

我希望这至少能给您足够的入门。

Please see the manual for your database manager and have fun trying different options yourself.

请参阅数据库管理员的手册,并尝试自己尝试其他选项,这很有趣。

翻译自: https://www.freecodecamp.org/news/sql-order-by-statement-example-sytax/

sql注入语句示例大全

sql注入语句示例大全_SQL Order By语句:示例语法相关推荐

  1. sql注入语句示例大全_SQL Group By语句用示例语法解释

    sql注入语句示例大全 GROUP BY gives us a way to combine rows and aggregate data. GROUP BY为我们提供了一种合并行和汇总数据的方法. ...

  2. 从SQL SERVER 2000到SQL SERVER 2005 视图中存在 ORDER BY 语句的完全解决方案

    首先要看微软的一个官方文章: http://support.microsoft.com/kb/926292/ 文章中提到的补丁程序并未公开,需要与微软联系,工程师会给你下载地址和安装密码.我这里有一个 ...

  3. sql语句创建索引_SQL创建索引语句示例说明

    sql语句创建索引 This statement is used to create an "index" on a column in an existing table. 该语 ...

  4. sql avg函数使用格式_SQL AVG-SQL平均函数用语法示例解释

    sql avg函数使用格式 什么是SQL平均(AVG)函数? (What is the SQL Average (AVG) Function?) "Average" is an A ...

  5. sql注入空格被过滤_SQL注入:各种绕过检测的姿势

    这一篇主要总结一下sqlilabs中advanced injection中的用到的各种绕过,也就是less21-less38. 目录 1)数据编码 2)特殊字符.语法关键字过滤 3)存储型注入 4)特 ...

  6. SQL注入 mysql4.0版本_SQL注入(上)

    查相关内容(一定要在回显点处查看!) 查数据库名 http://120.203.13.75:6815/index.php?id=1 and 1=2 union select 1,database() ...

  7. mysql约束表达式大全_SQL常用约束语句

    常用五类约束: not null:非空约束,指定某列不为空 unique: 唯一约束,指定某列和几列组合的数据不能重复 primary key:主键约束,指定某列的数据不能重复.唯一 foreign ...

  8. c语言switch语句程序大全,C语言switch语句

    C语言中的switch语句用于从多个条件执行代码. 就像if else-if语句一样. C语言中switch语句的语法如下: switch(expression){ case value1: //co ...

  9. mysql语句统计总数_SQL一条语句统计记录总数及各状态数

    SQL一条语句统计记录总数及各状态数 方法一. 代码如下: SELECT SUM(正确数)+SUM(错误数) AS 总记录数,SUM(正确数),SUM(错误数) FROM ( SELECT COUNT ...

最新文章

  1. 微信小程序开发记录一,开发工具的使用
  2. APUE读书笔记-16网络通信-08非阻塞和异步IO
  3. 虚拟化技术—docker容器—私有库篇
  4. 盒马鲜生,快而准确的秘密!
  5. Java 基础——类和对象
  6. win10没有windows无线服务器,win10系统电脑没windows无线服务的解决方法
  7. 阿里云飞天AI加速器+Serverless容器,帮助图森未来提升资源利用率
  8. 机器学习实战(8):局部加强线性回归LWLR
  9. Python-语句结构
  10. 卸载linux订阅包
  11. 8月前端挑战-----如何做到这个月内每天下班学习两小时
  12. 网易云课堂-吴恩达机器学习-学习归纳-1-初识机器学习
  13. Android 端天气预报APP的实现(二)阿里云天气预报API的获取
  14. 微软Surface Pro 3:优秀由内而外
  15. 基于ONVIF协议的(IPC)客户端程序开发-10 设备校时
  16. 人类与计算机之间的围棋,棋圣怒吼:别忽悠我 电脑不可能战胜人类
  17. R语言股票市场指数:ARMA-GARCH模型和对数收益率数据探索性分析
  18. esp8266局域网内的TCP通信实验
  19. C语言学习之认识exit()函数
  20. 直捣三星老巢,小米携红米Note 5进军韩国市场!

热门文章

  1. 001 makefile的使用
  2. MMKV集成与原理,赶紧学起来
  3. MMKV集成与原理,成功跳槽阿里!
  4. python浅蓝色对应的代码_浅蓝色Python模块不在m上工作
  5. python基础03——数据类型string
  6. PhotoKit 照片库的管理-获取图像
  7. POJ3264 【RMQ基础题—ST-线段树】
  8. ORACLE DATAGURARD配置手记
  9. 这是我们的第一篇博客----偕行软件
  10. [转]const使用详解