sql求积怎么破?
select product_count, product_price from [order] where [user_id]=4078
表里有N行,每行有2列 数量(product_count)、价格(product_price)每行小计怎么求积,
数量、价格 小计
312.80?
813.90?
413.90?
613.90?
210.90?
59.80? sql select
[解决办法]
select product_count, product_price ,
(product_count * product_price) as money
from [order] where [user_id]=4078
select product_count,
product_price,
(product_count*product_price) '小计'
from [order]
where [user_id]=4078
select product_count, product_price,product_count*product_price '小计' from [order]
select product_count as 数量,
product_price as 价格,
product_count * product_price as 小计
from [order]
where [user_id]=4078