I know direct SQL query is not good practice, but I need to insert product using direct SQL query.
Also they do not want to use REST API for that.
Anyone has SQL queries to create a simple product with all the fields.

  • what fields of product you want to insert? – Amit Bera Jul 26 '19 at 3:55

Magento using EAV Structure for store product data. So, using single query it quit impossible or direct query, save product data, not possible.


There are a lot of tables and lots of related tables has used to save data for the product. So my suggestions to avoid the idea of using query save a product full data at the database, if you are new at Magento.

If you have talked about a single field/attribute save of this might be easy to answer. But you must have an idea of EAV data pattern.

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.