oracle中的关于总价的sql语句 有单价(price)、数量(amount)、总价(total)sql语句怎么写? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select price, amount, price * amount total from table; 其中price在产品表中,而另两个在订货表中,这样子怎么写呢? select a.amount,b.price,a.amount*b.price a.total from productinfo b,orderinfo a这样写报错,为什么呢? 表结构发下吧,没有where条件联系两个表当然要报错了 a.amount*b.price a.total 多写了a.应该是a.amount*b.price total 别名里是不能有a.的,而且没有where条件那要查处多少数据啊 产品表的结构pidcidpnameamountprice订货表的结构字段名oidpidamounttotalorderdate select a.amount , b.price , a.amount*b.price total from productinfo b,orderinfo a where a.pid = b.pid 求数据库中的一个正则表达式 oracle 查询问题 急 oracle中查询表中前3个月记录 procedure创建CSV文件时遇到的问题。 如何实现oracle开机自启动 请教大家:oo4o访问oracle数据库的方式在linux下是否支持 非高手不可解决......急...... oracle 数据库中,我要把所有的用户的表和日志全部备份出来,该怎么写? 创建实物视图(快照)? oracle数据库JOB执行抓数据问题 哪位老大给个cnoug的邀请码? 在线等 数据导入问题
这样写报错,为什么呢?
应该是a.amount*b.price total
pid
cid
pname
amount
price
订货表的结构
字段名
oid
pid
amount
total
orderdate
, b.price
, a.amount*b.price total
from productinfo b,orderinfo a
where a.pid = b.pid