mysql sub-select work around?

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Mike Starke
日付:  
題目: mysql sub-select work around?
I know the new version of MySQL supports subselects,
but I am just not ready for that upgrade. So here's my
question:

I have a table called 'idt' with two columns "unit" and "price".
How can I get an equivalent SQL statement that will work in
MySQL 3.23

SELECT SUM
        (
    SELECT (idt.unit * idt.price) AS Sub_Total
    FROM idt WHERE idt.myid = "1"
    )  AS Total 
    FROM idt


v/r
-Mike