Heim  >  Artikel  >  Datenbank  >  Oracle何时使用to_date函数

Oracle何时使用to_date函数

WBOY
WBOYOriginal
2016-06-07 17:05:261216Durchsuche

首先看数据类型,A字段日期型,比较时直接使用gt;=;B字段字符型,比较时要使用to_date函数转化,格式自己指定;A LOGON_TIM

首先看数据类型,,A字段日期型,比较时直接使用>=;B字段字符型,比较时要使用to_date函数转化,格式自己指定;

A    LOGON_TIME   DATE

B    KPI_VALUE    VARCHAR2(400)

下面是具体比较语句

select count(*) from  C   where  A>='2011-07-01' and DATE_TIME

select count(*) from  D   where  B>=to_date('20110701','yyyymmdd')  and date_time

linux

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn