Skip to content

Instantly share code, notes, and snippets.

@Buzovskiy
Created January 13, 2021 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Buzovskiy/1ca6aef80b719d9dcf8c2972adfce780 to your computer and use it in GitHub Desktop.
Save Buzovskiy/1ca6aef80b719d9dcf8c2972adfce780 to your computer and use it in GitHub Desktop.
SQL запрос на заполнение переводов для товаров для выбранного языка
INSERT INTO product_lang (id_product,id_lang,title, description)
SELECT
p.id,
l.id_lang,
NULL,
concat('description_test','_', l.iso_code)
FROM products p
LEFT JOIN lang l ON l.id_lang != 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment