Skip to content

Instantly share code, notes, and snippets.

@artemrogov
Last active June 23, 2018 15:45
Show Gist options
  • Save artemrogov/16d2ab74a0db47e34f5b039270126bf9 to your computer and use it in GitHub Desktop.
Save artemrogov/16d2ab74a0db47e34f5b039270126bf9 to your computer and use it in GitHub Desktop.
#естественное соединение таблиц продукты с атрибутами и их значениями
#естественное соединение таблиц продукты с атрибутами и их значениями:
select id_product,
name_product,
price,
code_product,
attributes.name,
atrr_values.value
from products
join attributes on attributes.product_id = products.id_product
join atrr_values on atrr_values.attr_id = attributes.id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment