I want to get all simple products and in addition, I want to get an attribute called title_name for those products. The attribute_id (from eav_attribute) of the attribute is 450.

This is what I got so far:

SELECT * FROM catalog_product_entity WHERE type_id = 'simple';

Now I need the join with the attribute and this is where I am struggling. How can I do that?

Magento 1.9

1 Answer 1


You can use below MySQL query to get the required records from the database

    `e`.`sku` as SKU , `e`.`entity_id` as 'Entity ID', `attribute_table`.`attribute_id` as 'Attribute ID',  `attribute_table`.`value` as 'Value'
    `catalog_product_entity` AS `e`
    `catalog_product_entity_varchar` AS `attribute_table` ON (`attribute_table`.`entity_id` = `e`.`entity_id`)
    `attribute_table`.`attribute_id` = 450 AND `e`.`type_id` = 'simple';

Hope this helps!!!

  • Yes, but there is no attribute_id column in catalog_product_entity? Did you mean attribute_table.attribute_id = 450?
    – Arnie
    Commented Sep 9, 2019 at 8:01
  • I've updated my answer, please check it again.
    – Sumit
    Commented Sep 9, 2019 at 9:11
  • 2
    Excellent. I've been searching for this all morning. Thanks. Additionally, if you're struggling with things like descriptions (in my case at least). change catalog_product_entity_varchar to catalog_product_entity_text Commented Jul 26, 2021 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.