how to get product id and sku in magento with SQL how to get product id and sku in magento with SQL sql sql

how to get product id and sku in magento with SQL


entity_id is product's unique id so if you call $product->getId(); you actually get entity_id

The reason for that column name is that product is an EAV (Entity Attribute Value) model so product is an entity - standardized EAV entity identification column name but it can bring confusion...

And the query:

SELECT entity_id as product_id, sku FROM catalog_product_entity


The column 'entity_id' is the ID for the products. So the catalog_product_entity table does contain both items.