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.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 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'


你可能感兴趣的:(JOIN,c,upload,sqlserver)