开发者

How to add integers to char in Oracle 11g SQL?

开发者 https://www.devze.com 2023-03-30 21:12 出处:网络
Is it possible to do something like this in a PL/SQL block: SELECT \'a\'+1 FROM du开发者_开发百科al;

Is it possible to do something like this in a PL/SQL block:

SELECT 'a'+1 FROM du开发者_开发百科al;

and the result should be "b".


Here is my solution

SELECT CHR(ASCII('a') + 1) FROM dual

but I bet there is something more tricky

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号