怎样在表中取指定记录(用sql语句)
数据库为pb自带的asa6.0,我想从表中用sql语句取第10-20行的记录显示,sql语句该怎样写?请高手赐教!谢谢! 好象,没办法~~ 无论ASA还是ASE数据库都没有这个功能,MS SQL SERVER2000有 我记得ASA较ASE早支持select top,不过ASA6.0是没有的啦。<br><br>
取page*rows_per_page行数据,然后扔掉前(page-1)*rows_per_page行<br>
<P>假设表的关键字是Column1,</P>
<P>select *</P>
<P>from (select top 20 from table_name) t1</P>
<P>where not exists(select * from (select top 9 from table_name) t2 where t2.column1=t1.column1)</P> <DIV class=quote><B>以下是引用<I>hexp</I>在2005-11-3 13:04:19的发言:</B><BR>
<P>假设表的关键字是Column1,</P>
<P>select *</P>
<P>from (select top 20 from table_name) t1</P>
<P>where not exists(select * from (select top 9 from table_name) t2 where t2.column1=t1.column1)</P></DIV>
<P>学习……</P>
页:
[1]