SQL问题!请进.....
Advertisement:
热门软件下载:
有一个表t1(id char(10),source int)
现想用以下查询为什么字段我无效?
select a.source as f1,a.source as f2,(f1+f2) from t1 as a
只要是想用 别名相加
推荐阅读
网友:lincanwen
select a.source as f1,a.source as f2,(a.source + a.source ) as f3 from t1 as a
网友:lufancy
as 。。。
网友:comanche
不能相加,a.source 中的东东只好再写一次
网友:yzf111
select f1,f2,f1+f2 from (select a.source as f1,a.source as f2 from t1) derivedtbl
网友:daniel2008
up
.
相关评论