我要查询我的文章表 article中最近 一个月 !!!的总数,发表日期字段为Arttimeselect count(*) from article where 语句怎么写呢?
解决方案 »
- 求一SQL语句
- distinct区分大小写问题!
- 排列组合的问题,双色球的问题,36选6
- 我要输入5000个记录到表里,有办法用循环吗,表里只有一列,列里只显示排序数字1,2,.......?
- 十分紧急一个问题
- 关于更新数据中一个非常奇怪的问题。
- 急!如何能用SQL语句把SQL数据库中2006-3-2日期格式的数据转换成2006-03-02格式的数据
- 在一台机器的SQL SERVER存储过程中取另一台机器的SQL SERVER中的数据
- 如何得到id号最小的记录(同时按时间字段排序) 如何写sql?
- WIN98上的SQL Server能注册NT服务器的上SQL Server,而NT服务器的上SQL Server却不能注册WIN98上的SQL Server?
- 请教如何将CSV数据文件导入数据库表中
- 关于程序调用存储过程超时的问题。
select count(*) from article
where datediff(dd,Arttime,getdate())<=30
--or:
select count(*) from article where Arttime>=dateadd(mm,-1,getdate())
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) from article where Arttime>=dateadd(mm,-1,getdate())' at line 1