Mysql how to do count pagination

Recently, a requirement has been developed in work. In order to reduce the creation of tables, a single table is designed with a little redundancy. For example, a user has 5 permissions, and 5 pieces of data need to be inserted into the table. Only the permissions are different, and other data are the same. Yes, when querying this table in paging, it is necessary to perform a paging query according to the count of the user.
The sql statement is written like this:

select count(distinct()) from

Guess you like

Origin blog.csdn.net/xiaowanzi_zj/article/details/132650367