日期:2014-05-19  浏览次数:20510 次

想问一下,这个SQL语句怎么不行!
以下是SQL语句,为什么这样写不行,谢谢!
select   count(*)   as   num   from   (select   *   from   orderlist   where   date   between   '2007-6-15   0:01:01 '   and   '2007-7-15   23:59:59 ')   where   country= 'China '

------解决方案--------------------
select count(*) as num from (select * from orderlist where date between '2007-6-15 0:01:01 ' and '2007-7-15 23:59:59 ') a where country= 'China '
在(SELECT * FROM ... 59:59 ') 后加个别名 如a 应该就行了