1

Есть запрос: SELECT image.image_id, offer_id FROM shop_item_param_image LEFT JOIN image ON shop_item_param_image.value = image.image_id

И 2 таблицы.

shop_item_param_image (offer_id, param_id, value) и image (image_id)

Необходимо переделать запрос так, чтобы он выдавал offer_id из первой таблицы, если во второй нет смежных записей

1 ответ 1

2
SELECT shop_item_param_image.offer_id 
FROM shop_item_param_image 
LEFT JOIN image ON shop_item_param_image.value = image.image_id
WHERE image.image_id IS NULL

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.