informix如何查询第一条记录

1.select first 1 * from shop;    正序查询第一条数据

 

2.select first 1 * from shop order by create_time desc;    按创建时间倒序查询第一条数据

 

3.select first 1 shopid from shop;    正序查询第一条数据中的shopid字段

 

4.select first 1 shopid from shop order by create_time desc;    按创建时间倒序查询第一条数据的shopid字段

posted @ 2018-07-31 15:21  塔卡哈西KSK  阅读(1012)  评论(0编辑  收藏  举报