微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

sqlserver 左连接的写法

select a.req_id,a.port_in_did,a.acctid,a.status,a.country,a.port_in_provider,b.calling_plan_name,c.filetype,a.first_name,a.last_name,a.street_number,a.street_number_suffix,a.pre_directional,a.street_name,a.street_suffix,a.post_directional,a.secondary_location_description,a.unit,a.city,a.state,a.zip,a.zip4 
from bb_DID_PORT_IN_REQUEST a,bb_nextone_calling_plan b,bb_did_port_in_upload c 

where a.port_in_provider=b.server_group_id 
and a.acctid*=c.acctid 
and port_in_did = '2012259193'

old
------------------------------------
new

select a.req_id,a.zip4

from bb_DID_PORT_IN_REQUEST a left join
 bb_did_port_in_upload c on a.acctid=c.acctid 
 inner join bb_nextone_calling_plan b on  a.port_in_provider=b.server_group_id
where 
 port_in_did = '2012259193'

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐