About 15,200,000 results
Open links in new tab
  1. mysql - Count table rows - Stack Overflow

    Dec 12, 2009 · What is the MySQL command to retrieve the count of records in a table?

  2. How can I count the numbers of rows that a MySQL query returned?

    Mar 3, 2009 · Getting total rows in a query result... You could just iterate the result and count them. You don't say what language or client library you are using, but the API does provide a …

  3. MySQL - Using COUNT(*) in the WHERE clause - Stack Overflow

    Nov 19, 2008 · SELECT DISTINCT gid FROM `gd` WHERE COUNT(*) > 10 ORDER BY lastupdated DESC Is there a way to do this without using a (SELECT...) in the WHERE clause …

  4. Can I do a max (count (*)) in SQL? - Stack Overflow

    May 10, 2017 · Or you can get one row per group with the highest count with DISTINCT ON (only Postgres): Select first row in each GROUP BY group? Actual Question I need to get the rows …

  5. sql - How to use count if in mysql - Stack Overflow

    May 7, 2019 · How to use count if in mysql Asked 6 years, 8 months ago Modified 6 years, 8 months ago Viewed 12k times

  6. Is it possible to specify condition in Count ()? - Stack Overflow

    Is it possible to specify a condition in Count()? I would like to count only the rows that have, for example, "Manager" in the Position column. I want to do it in the count statement, not using WH...

  7. sql - Counting number of grouped rows in mysql - Stack Overflow

    SELECT component, COUNT(*) OVER() as number_of_components FROM `xyz` WHERE labref = 'NDQA201303001' GROUP BY component I suppose that works with any query that use …

  8. COUNT(*) vs. COUNT(1) vs. COUNT(pk): which is better?

    Apr 26, 2010 · COUNT(1) - Will not fetch any row, instead count is called with a constant value of 1 for each row in the table when the WHERE matches. COUNT(PK) - The PK in Oracle is …

  9. count(*) vs count(column-name) - which is more correct?

    Jun 9, 2010 · The difference is: COUNT(*) will count the number of records. COUNT(column_name) will count the number of records where column_name is not null. …

  10. Get record counts for all tables in MySQL database

    Nov 13, 2008 · Is there a way to get the count of rows in all tables in a MySQL database without running a SELECT count() on each table?