i'm trying to get the product id and the SKU of each product in magento with SQL, i fount that the table catalog_product_entity
has all the SKUs but no product id.
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