+ -
当前位置:首页 → 问答吧 → 求一查询语句

求一查询语句

时间:2011-06-27

来源:互联网

fid name date
  2 aaa 2011-06-11
  5 bbb 2011-06-12
  5 aaa 2011-06-11
  2 aaa 2011-06-12
  3 ccc 2011-06-12
  2 aaa 2011-06-11
=======================================
我想要得到fid为2或name为aaa的2011-06-11的数据
select * from aaa where fid='2' or name='aaa' and date='2011-06-11'
这样出来的数据,有其它日期的数据,应该怎么写呢

作者: lshfong   发布时间: 2011-06-27

select * from aaa where (fid='2' or name='aaa') and date='2011-06-11'

作者: lxq19851204   发布时间: 2011-06-27

相关阅读 更多

热门下载

更多