After migrating our Magento 1 site to Magento 2 we're getting this error when we try place an order

Order saving error: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '', query was: INSERT INTO `` () VALUES ()

We've looked around but there seems to be no clear solution to this.

  • Which magento version are u using? Jan 19, 2018 at 7:50
  • It seems table missing form databaase Jan 19, 2018 at 7:50

6 Answers 6


Please check below tables in the database (number of tables depends as per stores/websites) :

sequence_invoice_1, sales_sequence_meta, sales_sequence_profile

May be this will fix the issue when placing order.


Finally resolved the issue.

Had to open and save each store view as there were missing tables for the storeview(s). This generated the missing tables and I was able to place an order.


There is two Method :

1) Firstly check the store id of your website then check the table in databases sales_sequence_profile, sales_sequence_meta
If table have missing or table not save the data with current store id.

You can use the below link :


2) Direct download the module and install it


bin/magento wagento:fixsalessequence --all


You can edit your entire store and without any change save it. Then flush your cache. After that, you can see the entire entry of the store in sales_sequence_meta table. Issue resolved now you can place an order. Thanks :)


I got the same error and after one day research I got the solution, this error comes because of some table entries are not found in tables - 'sales_sequence_meta' and 'sales_sequence_profile', after migration, and off course here sales_sequence_meta represents some tables entries such as 'sequence_order_3', 'sequence_invoice_3', 'sequence_creditmemo_3', 'sequence_shipment_3' etc. so if not found create them.

here, number represents store number,

check proper tables and entries as per store number if not found create and the error will be solved.


We had this closely related issue where the order could be placed but the payment provider couldn't update the order into the 'processing' state (by confirming the payment). (Multisafepay)


  • In MSP on the order page you will find under 'offline actions' the error '200 ng'.
  • In Magento you will see in the order history that the payment log is on 'initialized'.
  • The order state is pending, closed or canceled, but not processing.
  • In the DB you will see in the tables below that for the impacted storeview there are not as many records as the other storeviews sales_sequence_meta sales_sequence_profile => there should be 4 for each storeview: order, invoice, creditmemo, shipment
  • Possible errors in log: main.CRITICAL: SQLSTATE[42000]: Syntax error or access violation: 1103 Incorrect table name '', query was: INSERT INTO `` () VALUES ()"


  • Add rows in the existing tables: sales_sequence_meta and sales_sequence_profile
  • Create missing tables that are refered to in the sales_sequence_meta table in column sequence_table

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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