0

How to get all the categories and its description from Magento 2 Database using MySQL Query ?

1 Answer 1

1

Get Category Name

SELECT entity_id AS "CATEGORY ID", ccev1.value as "CATEGORY NAME" FROM `catalog_category_entity_varchar`as ccev1 JOIN eav_attribute AS ea1 ON ea1.attribute_id = ccev1.attribute_id WHERE ea1.attribute_code = 'name' AND ea1.entity_type_id = 3

Get Category Description

SELECT entity_id AS "CATEGORY ID", ccev1.value as "CATEGORY DESC" FROM `catalog_category_entity_text`as ccev1 JOIN eav_attribute AS ea1 ON ea1.attribute_id = ccev1.attribute_id WHERE ea1.attribute_code = 'description' AND ea1.entity_type_id = 3
1
  • Thank you, If you provide "category_id", "category_name", "category_description" together with a single query. That will fulfill my query completely. Commented Jan 20, 2022 at 9:20

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.