Let's say you have a string t, and want to insert into
an oracle database, and want to find the row later.
Sure, let's do this:
insert into table_a (status) values(?)
select * from table_a where status = ?
In java, it's pretty simple, right?
Just use prepared statement,
ps.setString(1,t)
And when read, also
ps.setString(1,t)
Everything works normal, unless t="".
When t is an empty string, no rows found!!!
'', is treated as null. This is an atrocious Oracle Database behavior!
No comments:
Post a Comment