This content has been marked as final. Show 1 reply
I'm not sure that I understand the question.
If you want to manually encrypt and decrypt data using DBMS_CRYPTO, the encrypted data should be stored in a RAW column. This is true whether the source data is a string, a number, or any other data type. Yes, you can often get away with storing encrypted data in a VARCHAR2 column up until you find yourself struggling with character set conversion issues at which point you'll need to convert to RAW anyway.
You certainly can manually encrypt a number and store it in a RAW column. You can't manually encrypt anything and store it in a NUMBER column. Well, I guess you could, it just would be a lot of effort for no real benefit. It rarely makes sense to do your own manual encryption and decryption-- key management becomes a major issue at that point. Letting Oracle handle the encryption using TDE generally makes much more sense.