LoginSignup
0
0

More than 5 years have passed since last update.

mysql tiny snippets

Posted at

インフラ業務を担当していたときに調べづらかったコマンドを備忘録的に記載。

カラムを単語で検索

mysql> select * from INFORMATION_SCHEMA.COLUMNS where column_name like '%last%' order by TABLE_NAME\G

直近Nヶ月内のような日時範囲検索

mysql> select * from member where last_active_time >= DATE_ADD(NOW(), INTERVAL -6 MONTH) order by last_active_time \G
0
0
0

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