欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

MySQL查询某个记录行号

程序员文章站 2022-03-31 19:07:54
...

查询test表中id为16的记录是第几行的两个方法 MySQL mysql select count(*) from test where id = (select id from test where id=16); +----------+| count(*) |+----------+| 1 |+----------+1 row in set (0.00 sec) mysql select count(*) from test wher

查询test表中id为16的记录是第几行的两个方法 MySQL
mysql> select count(*)  from test  where id 
        		            	
            	            	
            	            	
            	
mysql> select count(*)  from test  where id