Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
MySQLデータベースの特定のテーブルの行の総数を取得するための構文は何ですか?
私はいつもやった
SELECT count(*) FROM table
上記により、すべての行の総数がわかります。
WHERE句を簡単に追加して、サブセットの数を取得することもできます。
SELECT count(*) FROM table WHERE foo = 'bar'
SELECT count(*) FROM table_name