读书人

→点击← 帮忙写个SQL~

发布时间: 2012-02-03 22:02:47 作者: rapoo

→点击← 帮忙写个SQL~~在线等````
数据库
ID 111 222 333
1 我的 数学 2007-2-5
2 你的 语文 2007-2-4
3 他的 数学 2007-2-5
4 大家的 英语 2007-2-7

先在我要的数据有:记录的总和,111字段中=“我的”的总和,333字段中时间=今天而且111字段=“我的”总和

[解决办法]
select count(*) as t1,(select count(*) from table where 111= '我的 ' as t2),(select count(*) from table where 111= '我的 ' and 333= ' "&Date()& " ' as t3) from table

读书人网 >ASP

热点推荐