I use ISO 3166-2 codes to designate states (of many countries, not just the USA) in my database. Code
is the primary key of my States
table and and it is referenced by StateCode
foreign key column of my Cities
table.
As far as I can see, there are 5 (like US-CA
) and 6 (like RU-SPE
) symbol long codes in the standard.
Should I better use varchar(6)
or char(6)
type for the columns in SQL Server?
The database servers to be used are going to be SQL Server 2012 and Azure.
The application to access the data are based on ASP.Net 4.5 MVC 4 and Entity Framework 5.