select r1.rn,r1.* from( select t.file_sno fileSno, p.title title, faq_gettypename(p.type) as type, count(*) count, row_number()over( order by t.file_sno asc
) rn from t_wp_query_error_or_no_exist t, (select title, type, pk_auto_id from t_repository) p where t.file_sno = p.pk_auto_id group by t.file_sno,p.title,p.type )r1
http://blog.csdn.net/acmain_chm/article/details/4095531 MySQL中的ROWNUM的实现 MySQL 几乎模拟了 Oracle,SQL Server等商业数据库的大部分功能,函数。但很可惜,到目前的版本(5.1.33)为止,仍没有实现ROWNUM这个功能。 下面介绍几种具体的实现方法.建立实验环境如下mysql> create table tbl ( -> id int primary key, -> col int -> );Que...
from(
select t.file_sno fileSno,
p.title title,
faq_gettypename(p.type) as type,
count(*) count,
row_number()over(
order by
t.file_sno asc
) rn
from t_wp_query_error_or_no_exist t,
(select title, type, pk_auto_id from t_repository) p
where t.file_sno = p.pk_auto_id
group by t.file_sno,p.title,p.type
)r1
MySQL中的ROWNUM的实现
MySQL 几乎模拟了 Oracle,SQL Server等商业数据库的大部分功能,函数。但很可惜,到目前的版本(5.1.33)为止,仍没有实现ROWNUM这个功能。 下面介绍几种具体的实现方法.建立实验环境如下mysql> create table tbl ( -> id int primary key, -> col int -> );Que...