以文本方式查看主题

-  蓝色快车PB俱乐部论坛  (http://pb.besoft.com.cnhttp://pb.besoft.com.cn/bbs/index.aspindex.asp)
--  PowerBuilder MIS编程  (http://pb.besoft.com.cnhttp://pb.besoft.com.cn/bbs/index.aspbbs.asp?boardid=1)
----  问一个SQL语句的写法  (http://pb.besoft.com.cnhttp://pb.besoft.com.cn/bbs/index.aspdispbbs.asp?boardid=1&rootid=5139&id=5140)


--  作者:yjx2002
--  发布时间:2008/10/30 16:35:50

--  问一个SQL语句的写法
有2张表,每个表中2个字段,如A表id,name B表id,zw(职务),想得到一张表C,id,name,zw

A表的所有记录,有职务,填职务,没的为空,这样一张表;

我用select a.*,b.zw from a,b where a.id = b.id;只得到一张有职务的名单,没职务的

人一条都没有,请教高手,怎么写这样的SQL语句啊?先谢谢啦!


--  作者:tanjimmy
--  发布时间:2008/10/31 0:42:52

--  
select a.*,b.zw from a,b where a.id=b.id(+);
--  作者:yjx2002
--  发布时间:2008/10/31 20:39:34

--  
?????

">