日期:2014-05-18  浏览次数:20439 次

这句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]
from
dbo.Product_category_table t1
join
dbo.Product_category_table
t2
on
t1.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