Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以检查sql select查询中是否存在特定字段
select c.uid,c.cust_id,c.cust_name,a.phone from customer c, address a where (c.uid = a.uid Or a.uid is null)
在某些情况下地址表不包含 c.uid 对应的电话,在这种情况下会出错。有没有可能避免
我不清楚你在问什么,但听起来好像你想要一个外部连接:
select c.uid,c.cust_id,c.cust_name,a.phone from customer c left join address a on c.uid = a.uid