Oracle的时间查询语句

来源:互联网 发布:mac怎样卸载程序 编辑:程序博客网 时间:2024/05/22 08:06
public static final String TIME_BEGIN = " 00:00:01";

public static final String TIME_END = " 23:59:59";

"select count(balance) as BALANCE from CardTransaction where shopflag=" + shopFlag + " and flag=" + jiaoyiFlag + " and optime between to_Date('" + date + TIME_BEGIN + "','yyyy-mm-dd hh24:mi:ss') and to_Date('" + date + TIME_END + "', 'yyyy-mm-dd hh24:mi:ss')"

这个语句中date的类型为String类型

0 0
原创粉丝点击