|
View previous topic :: View next topic
|
| Author |
Message |
SENTHIL MURUGAAN Warnings : 1 New User
Joined: 12 Jan 2013 Posts: 32 Location: India
|
|
|
|
Is it possible to store Hexadecimal value in DB2?. If yes, then please share the procedure.
Advance thanks
Senthil |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
| What research have YOU done to try to find an answer for yourself as this seems to be a fairly basic question. |
|
| Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
| Everything is stored as as 1 and 0 bits. How that is interpreted is up to you. Hex is just a short-hand way of interpreting those bits. |
|
| Back to top |
|
 |
jerryte
Active User

Joined: 29 Oct 2010 Posts: 205 Location: Toronto, ON, Canada
|
|
|
|
| If the column is defined as CHAR then you can store any bytes of data. You can use the HEX() function to convert from bytes into a hexadecimal string. |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3109 Location: NYC,USA
|
|
|
|
This is a beginners forum question
Perhaps why don’t you tell us the need to store it in hex? |
|
| Back to top |
|
 |
Auryn
New User

Joined: 11 Jan 2006 Posts: 88 Location: Lower Saxony (DE)
|
|
|
|
| ... And if you'd like to insert or update, you can use x'F0F1F2'... |
|
| Back to top |
|
 |
|
|