作者EijiHoba (Feel)
看板PHP
标题Re: [请益] SQL语法=>使用My SQL
时间Thu Oct 18 21:30:21 2007
讯息是说
select week_ending,sum(units_sold) as total_sold from
这附近有语法上的错误,请参考手册
要不要试着分成几个部份
一部分一部份的测试语法有无问题
※ 引述《yld (努力中!!)》之铭言:
: 不好意思请教一下
: 我是My SQL的新手,这问题已经困扰我很久了
: select temp.week_ending,temp.total_sold
: from
: (select week_ending,sum(units_sold) as total_sold
: from sold
: group by week_ending) as temp
: where temp.total_sold =
: (select max(total_sold)
: from
: (select week_ending,sum(units_sold) as total_sold
: from sold
: group by week_ending) as temp2
: )
: 以上的语法我用於ACCESS与SQL Server中皆可以RUN
: 但是用在MY SQL中就不能RUN了会出现下列字句
: 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
: 'select week_ending,sum(units_sold) as total_sold from
: 想请问一下是版本问题还是My SQL不支援此种查询呢
: 谢谢!!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 125.224.169.100