您好,登录后才能下订单哦!
SELECT
FROM (SELECT A1. ,ROWNUM RN
FROM (SELECT H.*
FROM TBC_ADOWNBLK_HIST H
WHERE 1 = 1
ORDER BY adownblkid ASC) A1
WHERE ROWNUM <= 10)
WHERE RN >= 1
想排序必须按这种写法
--根据不同字典值去加‘前缀’
方法一
select CASE
WHEN dict_code = 'YYPZ' THEN '0' || CODE
ELSE '1' || CODE end as code,
name as name
from MSTB_BDS_DATA
where (dict_code = 'VOICEOTHERTYPE' or dict_code = 'YYPZ')
and record_state = '1'
方法二
(select '0'||CODE code,NAME from MSTB_BDS_DATA d where d.dict_code='YYPZ' and record_state = '1' ) union all (select '1'||CODE code,NAME from MSTB_BDS_DATA d where d.dict_code='VOICEOTHERTYPE' and record_state = '1')
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。