首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

这句sql语句错在哪里?有点难度,50分解决办法

2012-03-08 
这句sql语句错在哪里?有点难度,50分sql语句如下首先是自连接,然后让自连接的值合并为一列select t1.catego

这句sql语句错在哪里?有点难度,50分
sql语句如下
首先是自连接,然后让自连接的值合并为一列

select t1.category,t2.category,t1.category+t2.category as t3.category
from
dbo.Product_category_table t1
join
dbo.Product_category_table
t2
on
t1.id=t2.superid

[解决办法]

SQL code
--> 或者select t1.category,t2.category,t1.category+t2.category as [t3.category]fromdbo.Product_category_table t1joindbo.Product_category_tablet2ont1.id=t2.superid
[解决办法]
select t1.category,t2.category,t1.category+t2.category as [t3.category ]
from 
dbo.Product_category_table t1 
join 
dbo.Product_category_table 
t2 
on 
t1.id=t2.superid

热点排行
Bad Request.