开发者

Hexadecimal sequence in Oracle

开发者 https://www.devze.com 2022-12-12 11:00 出处:网络
I would like to generate 16 char length hex decimal value as sequence. My database is Oracle and would like to know is it possible to do so? I checked the SEQUENCE in Oracle but I think its only for n

I would like to generate 16 char length hex decimal value as sequence. My database is Oracle and would like to know is it possible to do so? I checked the SEQUENCE in Oracle but I think its only for numericals.

Any idea would be great help.

Thanks in advanc开发者_如何学Pythone,

Abdel Olakara


Yes, Oracle sequences are integers.

In order to use a sequence to generate a 16 character length hexadecimal value, you need to use TO_CHAR:

TO_CHAR(your_sequence.NEXTVAL,'XXXXXXXXXXXXXXXX')

List of supported TO_CHAR/TO_NUMBER formats.

0

精彩评论

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