取得するデータの個数を制限して、データベースがクラッシュするのを防ぎましょう。
デフォルトは1000でした。
1 2 3 4 5 6 |
#(9)取得する数に制限を与える limit句 select * from products limit 10; select * from products limit 0,10; select * from products limit 10,20; select * from users where last_name like '中%' limit 0,1000; select id,last_name,gender from users where gender=1 limit 10; |
次回はcsvとして保存する方法をやっていきましょう。
The following two tabs change content below.
Keita N
こんにちは すうがく を こよなくあいする
”二代目 圧倒的 かず まなぶ (´・ω・`)” です
心が豊かになる方法について 引き続き考えていきたいです。
最新記事 by Keita N (全て見る)
- python : pyscript - 2022年5月16日
- python : logging モジュールの使い方 - 2022年5月16日
- 機械名:号機:顧客番号 - 2022年2月17日