Home > Database > Mysql Tutorial > mysql 简单日期月份查询语句

mysql 简单日期月份查询语句

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 17:51:10
Original
1155 people have browsed it

本文章介绍了两条sql日期操作语句,一是查询2个日期之间的数据,二是查找当月的数据,代码如下有需要的朋友看看。

查询2个日期之间的数据:

 代码如下 复制代码

SELECT * FROM `cangku` WHERE ((shijian>=’2011-1-13′) and (shijian

查询当前月的数据:

 代码如下 复制代码

* from tables where month(Date)=month(now())

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
Latest Issues
sql file
From 1970-01-01 08:00:00
0
0
0
php - Overhead of prepare vs sql?
From 1970-01-01 08:00:00
0
0
0
Print sql statement
From 1970-01-01 08:00:00
0
0
0
Pass array to SQL insert query using PHP
From 1970-01-01 08:00:00
0
0
0
sql optimization or
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template