Country Code (ISO 3166-1 numeric) generator

Last modified: April 3, 2025

The Country Code (ISO 3166-1 numeric) generator creates synthetic data representing numeric country codes, as defined by the ISO 3166-1 standard. These codes are three-digit numbers that uniquely identify countries, such as 840 for the United States, 124 for Canada, or 826 for the United Kingdom. It is used in testing, development, or data simulation where numeric country identification is required, such as in international databases, shipping systems, or financial transactions.

Generator properties

The table provides key details about the generator, including the short name, sample of the generated data, the supported data types, and whether it is specific to a particular country.

Short name Example of generated data Data type matching Country-specific
Country Code Num 056, 840, 392, … charactercharacter varyingtextsmallintintegerbigintdecimal Default

Matching rules

The generator can be assigned to a column that matches any of the following rules:

  • The column name is ‘Code’, and it belongs to a table whose name is ‘Country’.
  • The column name contains ‘Country’, preceded or followed by any or no characters, regardless of the table name.
  • The column name contains ‘Addr’, preceded or followed by any or no characters, and ends with ‘3’, ‘4’, ‘5’, or ‘6’, regardless of the table name.
  • The column name contains ‘Country’, preceded or followed by any or no characters, and ends with ‘id’, regardless of the table name.

Configure additional options

The generator produces data based on a regular expression. Since it is built on the RegExp generator, see Regular Expression generator to customize settings and understand the correct usage of syntax.

The Text box displays a .csv file that contains a list of country codes. The default path to the file is C:\Users\Public\Documents\Devart\dbForge Studio for PostgreSQL\Data Generators\CountryCodes.csv.

Preview of the column data generated by the Country Code (ISO 3166-1 numeric) generator

Country Code (ISO 3166-1 numeric) generator