sql注入语句示例大全_SQL Order By语句:示例语法
sql注入語(yǔ)句示例大全
Order By is a SQL command that lets you sort the resulting output from a SQL query.
Order By是一個(gè)SQL命令,可讓您對(duì)SQL查詢(xún)的結(jié)果輸出進(jìn)行排序。
訂購(gòu)依據(jù)(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提供了一種對(duì)SELECT部分??中一個(gè)或多個(gè)項(xiàng)目的結(jié)果集進(jìn)行排序的方法。 這是一個(gè)按FullName降序?qū)W(xué)生進(jìn)行排序SQL。 默認(rèn)的排序順序?yàn)樯?ASC),但要使用相反的順序(降序),請(qǐng)使用DESC。
Here's the query
這是查詢(xún)
SELECT studentID, FullName, sat_score FROM student ORDER BY FullName DESC;And here's the resulting data, presented in a nice descending table.
這是結(jié)果數(shù)據(jù),以漂亮的降序表顯示。
+-----------+------------------------+-----------+ | 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.
這是與上述內(nèi)容比較的未排序,當(dāng)前的完整學(xué)生列表。
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事物一樣,它們比本入門(mén)指南中的內(nèi)容要多得多。
I hope this at least gives you enough to get started.
我希望這至少能給您足夠的入門(mén)。
Please see the manual for your database manager and have fun trying different options yourself.
請(qǐng)參閱數(shù)據(jù)庫(kù)管理員的手冊(cè),并嘗試自己嘗試其他選項(xiàng),這很有趣。
翻譯自: https://www.freecodecamp.org/news/sql-order-by-statement-example-sytax/
sql注入語(yǔ)句示例大全
總結(jié)
以上是生活随笔為你收集整理的sql注入语句示例大全_SQL Order By语句:示例语法的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 梦到自己送外卖啥意思
- 下一篇: 为什么总是梦到有人打我