读书人

top语句为何无效?

发布时间: 2012-03-25 20:55:16 作者: rapoo

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条记录

读书人网 >VFP

热点推荐