LoginSignup
0
0

More than 5 years have passed since last update.

MySQLで生徒の中から自分の好みのスタイルの子を探す方法(メモ)

Last updated at Posted at 2013-11-16

これでボンキュッボン(死語)な子のリストができる訳です


select id, family_name, first_name, B ,W ,H from students where B >= 80 && W <= 65 && 65 <= H <= 80;

比較演算子は試してない(h(ヒップ)の比較演算が正常に動くかは不明)

ユーザーのidから名前を特定してデバッグしたりするときに使ったり

追記


select id, family_name, first_name, B ,W ,H from students where B >= 80 && W <= 65 && H between 65 and 80;

という風に
where [attribute] between [A] and [B]
を使用すると可読性高くなりますね

kuchikiosさんありがとうございました!

0
0
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0