SELECT *, COUNT(*) in SQLite

前端 未结 4 1202
余生分开走
余生分开走 2020-12-17 09:14

If i perform a standard query in SQLite:

SELECT * FROM my_table

I get all records in my table as expected. If i perform following query:

4条回答
  •  被撕碎了的回忆
    2020-12-17 10:17

    count(*) is an aggregate function. Aggregate functions need to be grouped for a meaningful results. You can read: count columns group by

提交回复
热议问题