1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

what type is allowed for oracle BLOB

Discussion in 'Oracle' started by prashantSum, Jun 5, 2006.

  1. prashantSum

    prashantSum New Member

    Joined:
    Oct 24, 2005
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    0
    what type of data is allowed for blob?

    Is it only 0's and 1's as the name implies.

    but I am able to insert 0-9 and a-f through sql* plus. why is it so?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,292
    Likes Received:
    365
    Trophy Points:
    83
    Its not restricted to 0's and 1's but its the way they are stored. 0-9 and a-f can also be represented in 0's and 1's form and stored in that fashion.
     
  3. prashantSum

    prashantSum New Member

    Joined:
    Oct 24, 2005
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    0
    thanks for the reply,

    I am unable to insert data other than 0-9 and a-f into BLOB, as it is giving 'ORA-00911: invalid character' message.
    So does it only allow Hexadecimal numbers.

    If so, why it is allowing Hexadecimal numbers when it's name is Binary LOB?

    And one more thing when I take a word document as InputStream through JDBC and insert it into BLOB how I am able to insert word document into BLOB, as word document contains characters other than 0-9 and a-f.

    I am not getting low level clarity as how data is managed in BLOB, can you give some clarity on this.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,292
    Likes Received:
    365
    Trophy Points:
    83
    Actually it allows the characters represented in the Hex form and not only the Hex characters. Even Z can be represented as binary value and has a Hex equivalent.
    Because there is a relation between Hex and binary and hex is just a way to represent binary data in a convenient manner.
    Because you are representing each bytes into binary values.
     
  5. mikestewart

    mikestewart New Member

    Joined:
    Jul 24, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Me too I would like to know aswell
     
  6. mikestewart

    mikestewart New Member

    Joined:
    Jul 24, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Me too I would like to know aswell
     
  7. mikestewart

    mikestewart New Member

    Joined:
    Jul 24, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    ooo
     
  8. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,292
    Likes Received:
    365
    Trophy Points:
    83

Share This Page