<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>sakaik</author_name>
  <author_url>https://blog.hatena.ne.jp/sakaik/</author_url>
  <blog_title>sakaikの日々雑感～(T)編</blog_title>
  <blog_url>https://sakaik.hateblo.jp/</blog_url>
  <categories>
    <anon>mysql</anon>
  </categories>
  <description>自分では「知っている」と思っていても、会話の中でふと自信がなくなることってありますよね。 自分の知識として「常識」になっているけど、気づけば10年以上も意識して試したことのないものとか。 表題のテーマが、今回の私のソレです。 ということで、COUNT(*) とか COUNT(カラム名) とかの書き方で動作がどう変わるのか改めて試した結果を整理してみた、という、初心者向きの内容です。 どんな書き方があるか COUNT(*) COUNT(カラム名) COUNT(DISTINCT カラム名) これらはそのカラムが NULL の行が存在するか否かで結果が変わります。 サンプルデータ CREATE TA…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsakaik.hateblo.jp%2Fentry%2F20220719%2Fmysql_count_function_with_null&quot; title=&quot; COUNT()関数の中身の書き方による動作の違い - sakaikの日々雑感～(T)編&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-07-19 23:22:34</published>
  <title> COUNT()関数の中身の書き方による動作の違い</title>
  <type>rich</type>
  <url>https://sakaik.hateblo.jp/entry/20220719/mysql_count_function_with_null</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
