I am using magento 2 enterprise edition i am trying to get products URL from sql database for this i have seen catalog_products_entity_varchar but in value attribute column products imgages are given so please help me about this problem

error screeen shoot


you can get it form url_rewrite table

there are entity_id is product_id and request_path is display url

  • i have no find any table as such name – Shan Haider May 15 at 9:54
  • Are you looking in magento2 or magento1? becuse in magento it's name url_rewrite and in magento1 core_url_rewrite – Rutvee Sojitra May 15 at 9:55
  • magento 2.2.5 as i mention in title body can u please send accurate table name..? – Shan Haider May 15 at 9:56
  • Then you must have url_rewrite table – Rutvee Sojitra May 15 at 9:56

You need to do following steps.

  1. Open the table "eav_attribute" and search the record with this condition "entity_type_id" = 4 and "attribute_code" = sku

enter image description here

so now you get the row which show the attribute_id for the url_key something like this.

enter image description here

In demo case it is 121.

  1. Now open the "catalog_product_entity_varchar" table and serch the record by "attribute_id" = 121

enter image description here

And finaly you get the product URL like this one.

enter image description here

If you are trying to make the query, then you need to write like this :

SELECT * FROM 'catalog_product_entity_varchar' WHERE 'attribute_id' = 121

  • with query empty record show – Shan Haider May 15 at 10:05
  • You need to replace your attribute_id here from the table "eav_attribute" – Dhiren Vasoya May 15 at 10:06
  • @ShanHaider you get your answer or not? – Dhiren Vasoya May 15 at 12:03
  • yes thanks @Dhiren – Shan Haider May 16 at 5:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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