当前位置: 代码迷 >> VFP >> top语句为何无效?
  详细解决方案

top语句为何无效?

热度:2965   发布时间:2013-02-26 00:00:00.0
top语句为何无效?在线等!
select   *   top   1   from   table1   where   ***= '111 '   order   by   ***

为何总是选出所有符合记录的?

用distinct的话倒是只选出了一个

------解决方案--------------------------------------------------------
VFP6.0
1、
select * top 1 from table1 where 字段1= '111 ' order by 字段1
得到多条记录

2、
select * top 1 from table1 where 字段1= '111 ' order by 字段2
得到1条记录


VFP9.0
1、
select * top 1 from table1 where 字段1= '111 ' order by 字段1
得到1条记录

2、
select * top 1 from table1 where 字段1= '111 ' order by 字段2
得到1条记录
  相关解决方案