text 02 - Récupérerdesinformations avec SELECT
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 02 - Récupérerdesinformations avec SELECT相关的知识,希望对你有一定的参考价值。
select * from wizard where birthday between '1975-01-01' and '1985-12-31' AND is_muggle='0';
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| id | firstname | lastname | birthday | birth_place | biography | is_muggle |
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
| 1 | harry | potter | 1980-07-31 | london | | 0 |
| 2 | hermione | granger | 1979-09-19 | | Friend of Harry Potter | 0 |
| 4 | ron | weasley | 1980-03-01 | | Best friend of Harry | 0 |
| 5 | ginny | weasley | 1981-08-11 | | Sister of Ron and girlfriend of Harry | 0 |
| 6 | fred | weasley | 1978-04-01 | | | 0 |
| 7 | george | weasley | 1978-04-01 | | | 0 |
| 10 | drago | malefoy | 1980-06-05 | | | 0 |
+----+-----------+----------+------------+-------------+---------------------------------------+-----------+
7 rows in set (0,00 sec)
select * from wizard where firstname LIKE 'H%';
+----+-----------+----------+------------+-------------+------------------------+-----------+
| id | firstname | lastname | birthday | birth_place | biography | is_muggle |
+----+-----------+----------+------------+-------------+------------------------+-----------+
| 1 | harry | potter | 1980-07-31 | london | | 0 |
| 2 | hermione | granger | 1979-09-19 | | Friend of Harry Potter | 0 |
+----+-----------+----------+------------+-------------+------------------------+-----------+
2 rows in set (0,00 sec)
select * from wizard where lastname LIKE 'potter';
+----+-----------+----------+------------+-------------+------------------------+-----------+
| id | firstname | lastname | birthday | birth_place | biography | is_muggle |
+----+-----------+----------+------------+-------------+------------------------+-----------+
| 1 | harry | potter | 1980-07-31 | london | | 0 |
| 3 | lily | potter | 1960-01-30 | | mother of Harry Potter | 0 |
+----+-----------+----------+------------+-------------+------------------------+-----------+
2 rows in set (0,00 sec)
SELECT firstname, lastname, birthday FROM wizard ORDER BY birthday ASC LIMIT 0,1;
+-----------+------------+------------+
| firstname | lastname | birthday |
+-----------+------------+------------+
| albus | dumbledore | 1881-07-01 |
+-----------+------------+------------+
1 row in set (0,00 sec)
以上是关于text 02 - Récupérerdesinformations avec SELECT的主要内容,如果未能解决你的问题,请参考以下文章
python Récupérerlesdonnéessuitesàunesuppress d'objet
java Récupérerdesvaleurs saisies par l'utilisateur
html 有效的点菜谷歌地图和récupérer高度sur clique
python #Cescriptrécupèreuneliste de nomsetvérified'abords'il existent dans Wi
sh Localiser un texte parmis tous les fichier d'répertoire
JAVASCRIPT:Récupérer date en JAVASCRIPT(客户端日期)