Oracle中,有时候我们需要用到字符串连接来拼接语句,这样可以让我们组成语句更加的便捷。

EG:||

select count(*) as k2 ,t.cityid as k1 from
portal_user t where
t.createtime >= to_date(#YbeginTime#||' 00:00:00','yyyy-mm-dd HH24:mi:ss')
and to_date(#YendTime#||' 23:59:59','yyyy-mm-dd HH24:mi:ss')>=t.createtime
group by t.cityid order by cityid