CA Province Code generator

Last modified: April 3, 2025

The CA Province Code generator creates Canadian province or territory codes based on province names, postal codes, or other criteria. It might be used in database management, form validation, or software development.

Note

If you select Canada from the Country-specific data list on the Options page of the Data Generator Project Properties wizard, the CA Province Code generator will be applied to columns that meet the matching rules, replacing the default (United States) generator.

CA Province Code specific data

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
CA Province Code ON, NB, YT, NL, … charactercharacter varyingtext CA

Matching rules

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

  • The column name contains ‘Provin’, preceded or followed by any or no characters, regardless of the table name.
  • The column name starts with ‘billing’ or ‘shipping’ and then goes ‘code’, preceded or followed by any or no characters, regardless of the table name.
  • The column name ends with ‘State’, preceded by any or no characters, regardless of the table name.
  • The column name is ‘abbr’, and it belongs to a table whose name contains ‘State’ or ‘Province’, preceded or followed by any or no characters.

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.

Preview of the column data generated by the CA Province Code generator

CA Province Code generator