Home > Database > Mysql Tutorial > body text

Oracle何时使用to_date函数

WBOY
Release: 2016-06-07 17:05:26
Original
1216 people have browsed it

首先看数据类型,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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!