NutzCN Logo
精华 我想问一下 怎么在程序中获得ROW_NUMBER() OVER (ORDER BY mau.id) AS NO值
发布于 3225天前 作者 qq_722cb381 1934 次浏览 复制 上一个帖子 下一个帖子
标签:

SELECT * from
(SELECT
ROW_NUMBER() OVER (ORDER BY mau.id) AS NO,
mau.id AS id,
map.name AS mobilename,
mau.no AS nos,
mau.password AS password,
mau.devices AS devices,
mau.firstlogin AS firstlogin,
mau.uselog AS uselog,
mau.description AS descs,
mau.appid AS appid

FROM
mc_magiccard_code mau
LEFT JOIN mc_magiccard map ON map.id = mau.appid
)t
$condition WHERE t.appid=@keyid ORDER BY t.NO DESC

4 回复

用Record接收的吗? 遍历一下key你就知道了

我是用这个 接收的 我遍历 了 没获取到 只能获取到实体bin 里的属性

Sql sqlcount =dao.sqls().create("find.mobileauth.by.serch.size");
sqlcount.setCallback(Sqls.callback.entities());
Entity entity =dao.getEntity(MagicCardCode.class);
sqlcount.params().set("searchKey", searchKey);
sqlcount.params().set("keyid", keyid);
sqlcount.setEntity(entity);
dao.execute(sqlcount);
List size=sqlcount.getList(MagicCardCode.class);

Entity只有Pojo中的属性, 用records接收

添加回复
请先登陆
回到顶部