1

I want to get a list of all unused product attributes through database or code. Any help would be appreciated.

1 Answer 1

1

Try this:

SELECT attribute_id, attribute_code, frontend_label FROM eav_attribute WHERE entity_type_id = 4 AND attribute_id NOT IN(SELECT attribute_id FROM eav_entity_attribute);

You can change entity_type_id for whatever entity you want.

2
  • Thank you for your reply. This query gets all the unassigned attributes. I want to get a list of 'unused' attributes(Attributes which may be assigned to the attribute set but never used in any products).
    – mechanic
    Feb 9, 2022 at 10:27
  • You can change the table name in inner query like "catalog_product_entity_int" I think it should work.
    – Ankit
    Feb 9, 2022 at 11:15

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.