![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
oracle的细节
FN_BLBQ
这个作者很懒,什么都没留下…
展开
-
如何使用北京时间查询oracle数据库中UTC时间的数据
使用北京时间查询oracle数据库中UTC时间的数据,需要使用oracle中的函数如果要查询的日期字段为字符串,需要转换为date类型,这里需要先将这个字段转换为日期格式用到 to_date 函数,因为北京时间比UTC时间晚8小时,因此 +1/3天即可然后使用 to_char 转为字符去和你传入的字符串参数进行比较例如:此时 userTime 是 varchar2 格式select * from user where to_char(to_date(userTime,'yyyy-mm-dd')原创 2020-05-20 16:26:50 · 878 阅读 · 0 评论 -
ORACLE数据库where后条件为空判断
在项目中针对where后的条件为空判断一般情况下where后面的条件不能为null值,如果为null,可以加上 **is null** 即可例如:select * from user where username is null原创 2020-05-20 16:00:10 · 4791 阅读 · 0 评论