拆分一句sql语句,不含子查询的。

lianyi0927 2008-03-14 09:24:35
各位大虾,小弟有一句SQL语句需要拆分成不含子查询,水平有限,帮帮忙啊~
原句是:
SELECT AA.*,BB.leiming from(select a.*,b.chubanshe from (select * from Bookinfo)as a left join(select * from chubanshe) as b on (a.chubansheID=b.id)) as AA left join (select * from class) as BB on (AA.classID=BB.id)
...全文
130 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
msdnlu 2008-03-14
select a.*,b.chubanshe,c.leiming
from
Bookinfo as a
left join
chubanshe as b
on
a.chubansheID=b.id
left join
class as c
on
a.classID=c.id
回复
-狙击手- 2008-03-14
路过
回复
中国风 2008-03-14

select
a.*,b.*,c.leiming
from
Bookinfo a
left join
chubanshe b on a.chubansheID=b.ID
left join
class c on c.ID=a.classID--这里定义列
回复
中国风 2008-03-14
select
a.*,b.*,c.leiming
from
Bookinfo a
left join
chubanshe b on a.chubansheID=b.ID
left join
class c on c.ID=b.ID
回复
相关推荐
发帖
MS-SQL Server
创建于2007-09-28

3.3w+

社区成员

MS-SQL Server相关内容讨论专区
申请成为版主
帖子事件
创建了帖子
2008-03-14 09:24
社区公告
暂无公告