I have the following table:
create table Mike_Test
( Id raw(32) default sys_guid() not null primary key,
Value varchar2(80) not null unique
);
I now insert into this table:
INSERT INTO Mike_Test (VALUE) VALUES ('Blah');
I can confirm there's a new row in there:
select * from Mike_Test;
And I see:
08364fc81419429d83c9bcedb24a9a57 Blah
Now I try to SELECT that row with:
select * from Mike_Test WHERE ID='08364fc81419429d83c9bcedb24a9a57';
However, I get zero rows and zero errors. What am I doing wrong?
It's a RAW datatype, you have to query like this:
select .... where id=hextoraw('08364fc81419429d83c9bcedb24a9a57') ....
I think you might need to use the HEXTORAW
function around your ID
value. This function converts a hex string into the corresponding RAW
value.
In other words, your query should look like the following:
select * from Mike_Test WHERE ID=HEXTORAW('08364fc81419429d83c9bcedb24a9a57');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With