I am new in Magento2.3. I want to create a Drop down for states for Italy country.

In Magento1 we have used below code:

INSERT INTO  `magento1.6`.`directory_country_region` (
`region_id` ,
`country_id` ,
`code` ,
'0',  'IN',  'IN-DL',  'New Delhi'

What is the code in Magento2?

2 Answers 2


Magento 2 directory_country_region table is the same with magento 1. You can use same SQL to add Italy states:

INSERT INTO  `magento2.3`.`directory_country_region` (
`country_id` ,
VALUES ('IT',  'Rome',  'Rome');

We don't need region_id because it is auto increasement.

Please note that same state name can be added multiple times so if you run insert query more than once, you will end up with something like this:

enter image description here

If this happens, you can go to your database and remove the dupplicated entries.


In Magento 2 you can enable state options in backend of your shop login in Magento backend and go to tab

Store->General->General you will see state options you have to enable that for Italy and clear cache

enter image description here

bin/magento clear:cache
  • yes its correct but i want to add these using schema.php how can i do that
    – maeneo
    Mar 19, 2020 at 11:31

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.