1
我試圖返回salesperson_id和salesperson_lnames列表,其中salesperson_id沒有FL或HI中的客戶。訪問SQL NOT LIKE查詢
我當前的查詢是
SELECT DISTINCT s.salesperson_id, s.salesperson_lname
FROM salesperson_t AS s inner join customer_t AS c on s.salesperson_id=c.salesperson_id
WHERE c.state not in ('HI', 'FL');
而且它無論是HI或F11返回僅排除salesperson_id和salesperson_lname如果他們有客戶在這兩個HI和佛羅里達州,而不是havinga單一客戶名單。