首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

oracle 获得某一条记录中的,所有当天记录

2012-11-09 
oracle 取得某一条记录中的,所有当天记录取得某一条记录的当天所有记录1.常见方式select * from syslog_lo

oracle 取得某一条记录中的,所有当天记录
取得某一条记录的当天所有记录

1.常见方式
select * from syslog_logstack a where to_date(to_char(createtime, 'yyyy-mm-dd'), 'yyyy-mm-dd') =
(select to_date(to_char(createtime, 'yyyy-mm-dd'), 'yyyy-mm-dd') as createtime  from syslog_logstack t where t.logstack_id='83899')

2.这样更简单
select * from syslog_logstack a where to_char(createtime, 'yyyy-mm-dd') =
(select to_char(createtime, 'yyyy-mm-dd') as createtime  from syslog_logstack t where t.logstack_id='83899')

热点排行