Hi i want to write the below query in different way can you please
告訴我如何以不同方式寫入,因此最少需要 才能執行。不使用index.I書面查詢越來越精確的輸出,但它需要太多的時間優化查詢而不使用不在子句中
select distinct location from get_shipping_data gsd
where location not in
(
select pkd.shipmentlocation from package p
left join packagedetail pkd on pkd.packingid=p.packingid
where p.shippingnum='SH0667075'
)
and gsd.shipmentid='SH0667075'
如果您粘貼查詢和所需輸出的*文本*而不是圖像,它將會更有用。其次,如果查詢正在運行,您應該在[CodeReview](http://codereview.stackexchange.com/)上發佈。你使用的是 – trincot
應該在1行中返回兩個結果嗎?使用STUFF – maSTAShuFu