{"published":"2016-03-11 11:30:20","type":"rich","author_name":"paranishian","blog_url":"https://paranishian.hateblo.jp/","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","image_url":null,"blog_title":"paranitips","version":"1.0","title":"mysql\u3067\u540c\u4e00\u5358\u8a9e\u3092\u8907\u6570\u30ab\u30e9\u30e0\u306b\u308f\u305f\u3063\u3066\u691c\u7d22\u3059\u308b","categories":["\u958b\u767a"],"width":"100%","height":"190","author_url":"https://blog.hatena.ne.jp/paranishian/","description":"CONCAT\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002 \u4f8b\u3048\u3070colA, colB\u306e\uff12\u3064\u306e\u30ab\u30e9\u30e0\u3067aaa\u3092\u691c\u7d22\u3057\u305f\u3044\u5834\u5408\u3001 SELECT * FROM hoge_table where CONCAT(colA, colB) = \"aaa\" \u3068\u306a\u308a\u307e\u3059\u3002 \u305f\u3060\u3001colA, colB\u306e\u3044\u305a\u308c\u304b\u304cNULL\u306e\u5834\u5408\u3001CONCAT\u306e\u7d50\u679c\u3082NULL\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u306e\u3067IFNULL\u3067\u56de\u907f\u3057\u307e\u3059\u3002 SELECT * FROM hoge_table where CONCAT(IFNULL(colA,''), IFNULL(colB,'')) = \"aaa\" \u3061\u306a\u307f\u306b Ransack\u3067\u66f8\u304f\u5834\u5408\u306b\u3082\u4f7f\u3048\u308b\u306e\u3067\u4fbf\u5229\u3067\u3059\u3002 ransacker :c\u2026","url":"https://paranishian.hateblo.jp/entry/2016/03/11/113020","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fparanishian.hateblo.jp%2Fentry%2F2016%2F03%2F11%2F113020\" title=\"mysql\u3067\u540c\u4e00\u5358\u8a9e\u3092\u8907\u6570\u30ab\u30e9\u30e0\u306b\u308f\u305f\u3063\u3066\u691c\u7d22\u3059\u308b - paranitips\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}