Guides › Database reference › Products and attributes
Magento 2 catalog_product_entity table
One row per product (per version on Adobe Commerce). It has only a few fixed columns; names, prices and everything else are in attribute value tables.
Key columns
| Column | What it means |
|---|---|
entity_id | The product ID shown in the admin. Order lines, categories and stock link to it. |
sku | The product's SKU. |
type_id | simple, configurable, bundle, grouped, virtual, downloadable (and giftcard on Adobe Commerce). |
attribute_set_id | The attribute set it uses. |
created_at / updated_at | When it was created and last saved. |
Good to know
- There's no
nameorpricecolumn: those are incatalog_product_entity_varcharandcatalog_product_entity_decimal. - On Adobe Commerce, each product can have several rows, one per scheduled version, with
row_id,created_inandupdated_in. Filter to the current version:created_in <= UNIX_TIMESTAMP() AND updated_in > UNIX_TIMESTAMP().
Example: Number of products per type
Magento Open Source
SELECT type_id, COUNT(*) AS products
FROM catalog_product_entity
GROUP BY type_id
ORDER BY products DESC;
Adobe Commerce
SELECT type_id, COUNT(*) AS products
FROM catalog_product_entity e
WHERE e.created_in <= UNIX_TIMESTAMP() AND e.updated_in > UNIX_TIMESTAMP() -- current version only
GROUP BY type_id
ORDER BY products DESC;
Tested on Magento Open Source and Adobe Commerce 2.4.8. Read-only. If your tables have a prefix, add it to each table name.
Extra columns on Adobe Commerce
Adobe Commerce has 11 columns here instead of 8. The extra ones come from these Commerce features:
- Catalog Staging:
row_id,created_in,updated_in
Foreign keys
entity_id→sequence_product.sequence_valueAdobe Commerce
All 8 columns (Magento Open Source)
Show all columns
| Column | Type | Can be empty | Magento's description |
|---|---|---|---|
entity_id | int(10) unsigned | Entity ID | |
attribute_set_id | smallint(5) unsigned | Attribute Set ID | |
type_id | varchar(32) | Type ID | |
sku | varchar(64) | SKU | |
has_options | smallint(6) | Has Options | |
required_options | smallint(5) unsigned | Required Options | |
created_at | timestamp | Creation Time | |
updated_at | timestamp | Update Time |