{"height":"190","published":"2007-03-09 15:52:42","blog_url":"https://tyki.hatenadiary.org/","image_url":null,"provider_url":"https://hatena.blog","url":"https://tyki.hatenadiary.org/entry/20070309/1173423162","author_url":"https://blog.hatena.ne.jp/tyki/","width":"100%","title":"\u91cd\u8907\u3057\u3066\u3044\u308b\u30ec\u30b3\u30fc\u30c9\u306e\u307f\u3092\u62bd\u51fa\u3059\u308b","description":"\u91cd\u8907\u3092\u7701\u304d\u305f\u3044\u5834\u5408\u306fDISTINCT\u306a\u308aGROUP BY\u306a\u308a\u3067\u3044\u3044\u304c\u3001\u9006\u306b\u91cd\u8907\u3057\u3066\u3044\u308b\u30ec\u30b3\u30fc\u30c9\u306e\u307f\u62bd\u51fa\u3057\u305f\u3044\u3068\u3044\u3046\u30b1\u30fc\u30b9\u306b\u51fa\u304f\u308f\u3057\u305f\u306e\u3067\u30e1\u30e2\u3002 SELECT column, COUNT(*) FROM table GROUP BY column HAVING COUNT(*) > 1; \u672c\u5f53\u306b\u3084\u308a\u305f\u304b\u3063\u305f\u306e\u306f\u3001\u5f8c\u304b\u3089\u91cd\u8907\u3057\u305f\u30ec\u30b3\u30fc\u30c9\u3092\u4e00\u62ec\u3057\u3066\u524a\u9664\u3059\u308b\u3068\u3044\u3046\u3053\u3068\u3060\u3063\u305f\u3093\u3067\u3059\u304c\u3001\u4e0a\u624b\u3044\u65b9\u6cd5\u304c\u3069\u3046\u306b\u3082\u601d\u3044\u6d6e\u304b\u3070\u305a\u3002\u3061\u306a\u307f\u306b\u30b5\u30d6\u30af\u30a8\u30ea\u306e\u4f7f\u3048\u306a\u3044\u53e4\u3044MySQL\u3067\u3057\u305f\u3002\u307e\u3042\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u66f8\u3051\u3070\u3044\u3044\u3093\u3067\u3057\u3087\u3046\u3051\u3069\u3002","type":"rich","blog_title":"Code::Craft","categories":["sql"],"author_name":"tyki","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftyki.hatenadiary.org%2Fentry%2F20070309%2F1173423162\" title=\"\u91cd\u8907\u3057\u3066\u3044\u308b\u30ec\u30b3\u30fc\u30c9\u306e\u307f\u3092\u62bd\u51fa\u3059\u308b - Code::Craft\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","version":"1.0"}