sql limit子句_SQL子句解释的位置:之间,之间,类似和其他示例
sql limit子句
什么是SQL Where子句? (What is a SQL Where Clause?)
WHERE子句(和/或IN , BETWEEN和LIKE ) (The WHERE ?Clause (and/or, ?IN , ?BETWEEN , and ?LIKE ))
The ?WHERE ?clause is used to limit the number of rows returned.
WHERE子句用于限制返回的行數。
In this case all five of these will be used is a some what ridiculous ?WHERE ?clause.
在這種情況下,將使用所有這五個荒謬的WHERE子句。
Here is the current full student list to compare to the ?WHERE ?clause result set:
這是當前的完整學生列表,可與WHERE子句結果集進行比較:
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)Rows will be presented that…
將顯示以下行:
WHERE ?Student IDs are between 1 and 5 (inclusive)
WHERE學生ID是1和5(含)之間
OR ?studentID = 8
OR學生ID = 8
Here’s an updated query, where any record that has an SAT score that’s in this list (1000, 1400) will not be presented:
這是一個更新的查詢,其中不會顯示此列表中(1000,1400)具有SAT分數的任何記錄:
select studentID, FullName, sat_score, recordUpdated from student where (studentID between 1 and 5 or studentID = 8)andsat_score NOT in (1000, 1400);+-----------+----------------------+-----------+---------------------+ | 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 | | 4 | Louis Ramsey | 1200 | 2017-08-16 15:34:50 | | 5 | Alvin Greene | 1200 | 2017-08-16 15:34:50 | | 8 | Donald D. Chamberlin | 2400 | 2017-08-16 15:35:33 | +-----------+----------------------+-----------+---------------------+ 5 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/the-sql-where-clause-explained/
sql limit子句
總結
以上是生活随笔為你收集整理的sql limit子句_SQL子句解释的位置:之间,之间,类似和其他示例的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 梦到弟弟妹妹死了是什么征兆
- 下一篇: 孕妇梦到逝去的老师什么意思