Oracle treating empty string as NULL problem for a Java / JPA programmer

后端 未结 6 2445
失恋的感觉
失恋的感觉 2021-02-19 17:22

How do you handle this situation where Oracle stores the empty string as a null in the database ?

I would like it to be stored as an empty string as it is not as NULL, s

6条回答
  •  后悔当初
    2021-02-19 17:49

    Its early for me, but isn't

    select * from mytable where myfield like '%' or myfield is null
    

    the same as

    select * from mytable
    

    So, Oracle simplifies your life! ;)

提交回复
热议问题