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

数据库操作问题
如何将不同表中的列取出进行加减乘除等运算,比如将表1中的 "price "列取出,与表2中的 "rate "列相乘,用select语句怎么写?最好给出代码谢谢

------解决方案--------------------
select (a.price * b.rate) as result from table1 as a, table2 as b where a.productname = b.productname