Home > Database > Mysql Tutorial > body text

delphi access中SQL根据时间查询

WBOY
Release: 2016-06-07 15:43:02
Original
1352 people have browsed it

Access数据库虽然功能是差了点,但是有时对一些少量的数据保存很是很方便的,在delphi中也是如此,在查询时免不了要按照日期或 时间作为查询条件,access有些特别。 select * from table where startime #2014-02-20 2::12::00# 注意两点: 1、日期时间两端

Access数据库虽然功能是差了点,但是有时对一些少量的数据保存很是很方便的,在delphi中也是如此,在查询时免不了要按照日期或 时间作为查询条件,access有些特别。

select * from table where startime >#2014-02-20 2::12::00#

注意两点:

1、日期时间两端加#

2、时间中间的分隔符冒号要连续两个,因为在delphi中,:代表参数,::两个冒号表示非参数。

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