Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7441137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:57:48+00:00 2026-05-29T10:57:48+00:00

Is it possible to compare variables of raw datatypes? I’m working with XMLDOM.DomNodes, which

  • 0

Is it possible to compare variables of raw datatypes?
I’m working with XMLDOM.DomNodes, which is records with one field by itself:

TYPE DOMNode IS RECORD (id RAW(12));

So I have two nodes, then could I compare them by their id fields? I tried several samples and at first glance it seems to work:

  FUNCTION findParentNode(p_node IN xmldom.domnode) RETURN PLS_INTEGER
  AS
      nRetVal               PLS_INTEGER;
  BEGIN
     FOR i IN ParentNodes.First .. ParentNodes.Last
     LOOP 
         IF ParentNodes(i).id = p_node.id THEN               
            nRetVal := i;
            EXIT;
         END IF;         
     END LOOP;

     RETURN nRetVal;
  END;

but one thing in Oracle documentation worries me:
Raw data is like VARCHAR2 data, except that PL/SQL does not interpret raw data
What does it mean? If pl/sql doesn’t interpret raw, then could it compare?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T10:57:48+00:00Added an answer on May 29, 2026 at 10:57 am

    You can use the = operator if you want to see if two RAW variables have the same values.

    SQL> DECLARE
      2     a RAW(255) := utl_raw.cast_to_raw('abcdef');
      3     b RAW(50) := utl_raw.cast_to_raw('abcdef');
      4  BEGIN
      5     IF a = b THEN
      6        dbms_output.put_line('a = b');
      7     ELSE
      8        dbms_output.put_line('a != b');
      9     END IF;
     10  END;
     11  /
    a = b
    

    When the documentation states that RAW is like VARCHAR2, but not interpreted, it means that you can affect, store and even compare RAW variables just like you would VARCHAR2, but the binary value is never matched against a character set.

    VARCHAR2 variables, on the other hand, can be converted because of a mismatch between the character sets of the database and the client.

    RAW is a string of bytes instead of a string of characters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

is it possible in some way to compare multiple variables to one constant in
Is it possible to compare the result / output of one JUnit test to
Possible Duplicate: A better way to compare Strings which could be null I have
Is it possible to compare variables in TypoScript? If it is possible - then
Possible Duplicate: Compare dates in java I am getting two dates from server in
Is it possible to compare whole memory regions in a single processor cycle? More
Is it possible to use soundex to compare portion of a column with search
Using Django templates in Google App Engine (on Python), is it possible to compare
Possible Duplicates: Types for which “is” keyword may be equivalent to equality operator in
Possible Duplicate: Detecting an undefined object property in JavaScript javascript undefined compare How we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.