Re: [請益] SQL語法=>使用My SQL

看板PHP作者 (Feel)時間16年前 (2007/10/18 21:30), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
訊息是說 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
文章代碼(AID): #175r_o4p (PHP)
文章代碼(AID): #175r_o4p (PHP)