SELECT * FROM testdatetime t WHERE 1=1 AND t.createdate = '2011-07-01';
SELECT * FROM testdatetime t WHERE 1=1 AND t.createdate > '2011-07-01';
SELECT * FROM testdatetime t WHERE 1=1 AND t.createdate <&#39;2011-07-01&#39;;
SELECT * FROM testdatetime t WHERE 1=1 AND t.createdate >= &#39;2011-06-01&#39; AND
t.createdate <= &#39;2011-07-05&#39;; www.2cto.com
SELECT * FROM testdatetime t WHERE 1=1 AND to_date(t.createdate,&#39;yyyy-MM-dd&#39;) between to_date(&#39;2011-06-01&#39;,&#39;yyyy-MM-dd&#39;) and to_date(&#39;20110705&#39;,&#39;yyyymmdd&#39;) ;
SELECT * FROM testdatetime t WHERE 1=1 AND t.usedate = &#39;2011-07-01 10:00:00&#39;;
SELECT * FROM testdatetime t WHERE 1=1 AND t.usedate > &#39;2011-07-01&#39;;
SELECT * FROM testdatetime t WHERE 1=1 AND t.usedate <&#39;2011-07-01&#39;;
SELECT * FROM testdatetime t WHERE 1=1 AND t.usedate >= &#39;2011-06-01&#39; AND t.usedate <= &#39;2011-07-05&#39;;
SELECT * FROM testdatetime t WHERE 1=1 AND to_date(t.usedate,&#39;yyyy-MM-dd HH24:MI:SS&#39;)
between to_date(&#39;2011-07-01 12:00:00&#39;,&#39;yyyy-MM-dd HH24:MI:SS&#39;) and to_date(&#39;20110702 12:00:00&#39;,&#39;yyyymmdd HH24:MI:SS&#39;) ;
SELECT * FROM testdatetime t WHERE 1=1 AND t.startdate = to_date(&#39;2011-07-01&#39;,&#39;yyyy-MM-dd&#39;);
SELECT * FROM testdatetime t WHERE 1=1 AND t.startdate > to_date(&#39;2011-07-01&#39;,&#39;yyyy-MM-dd&#39;);
SELECT * FROM testdatetime t WHERE 1=1 AND t.startdate
SELECT * FROM testdatetime t WHERE 1=1 AND t.startdate >= to_date(&#39;2011-07-01&#39;,&#39;yyyy-MM-dd&#39;)
AND t.startdate <= to_date(&#39;2011-07-02&#39;,&#39;yyyy-MM-dd&#39;);
SELECT * FROM testdatetime t WHERE 1=1 AND t.startdate between to_date(&#39;2011-07-01&#39;,&#39;yyyy-MM-dd&#39;) AND to_date(&#39;2011-07-02&#39;,&#39;yyyy-MM-dd&#39;);
----------------------
SELECT * FROM testdatetime t WHERE 1=1 AND t.startdate = to_date(&#39;2011-07-01 12:00:00&#39;,&#39;yyyy-MM-dd HH24:MI:SS&#39;);
SELECT * FROM testdatetime t WHERE 1=1 AND t.startdate > to_date(&#39;2011-07-01 12:00:00&#39;,&#39;yyyy-MM-dd HH24:MI:SS&#39;);
SELECT * FROM testdatetime t WHERE 1=1 AND t.startdate
SELECT * FROM testdatetime t WHERE 1=1 AND t.startdate >= to_date(&#39;2011-07-01 01:00:00&#39;,&#39;yyyy-MM-dd HH24:MI:SS&#39;) AND t.startdate <= to_date(&#39;2011-07-01 23:00:00&#39;,&#39;yyyy-MM-dd HH24:MI:SS&#39;); www.2cto.com
SELECT * FROM testdatetime t WHERE 1=1 AND t.startdate between to_date(&#39;2011-07-01 01:00:00&#39;,&#39;yyyy-MM-dd HH24:MI:SS&#39;) AND to_date(&#39;2011-07-01 23:00:00&#39;,&#39;yyyy-MM-dd HH24:MI:SS&#39;);
-----------------------
SELECT * FROM testdatetime t WHERE 1=1 AND to_char(t.startdate,&#39;yyyy-MM-dd&#39;) = &#39;2011-07-01&#39;;
SELECT * FROM testdatetime t WHERE 1=1 AND to_char(t.startdate,&#39;yyyy-MM-dd&#39;) > &#39;2011-07-01&#39;;
SELECT * FROM testdatetime t WHERE 1=1 AND to_char(t.startdate,&#39;yyyy-MM-dd&#39;) <&#39;2011-07-01&#39;; www.2cto.com
SELECT * FROM testdatetime t WHERE 1=1 AND to_char(t.startdate,&#39;yyyy-MM-dd&#39;) >= &#39;2011-07-01&#39; AND to_char(t.startdate,&#39;yyyy-MM-dd&#39;) <= &#39;2011-07-02&#39;;
SELECT * FROM testdatetime t WHERE 1=1 AND to_char(t.startdate,&#39;yyyy-MM-dd&#39;) between &#39;2011-07-01&#39; AND &#39;2011-07-02&#39;;