How to create a new column with a sequential index - MapInfo Pro

Products affected: MapInfo Pro
Use the following MapBasic code in the MapBasic® window:

Alter Table "YourTableName" (add YourColumnName Char(25))
Update YourTableName Set YourColumnName = RowID

To do this you need to:
  • Open the MapBasic window (Ctrl+Shift+B)
  • Paste the following code in:
Alter Table "CANADA" (add Eif Char(25))
Update CANADA Set Eif = RowID​
  • Highlight both rows and hit Enter (or Ctrl+Enter depending on your settings)
​This will create a new column and populate it with the RowID for each column i.e. row 1 = 1, row 2 = 2 etc

UPDATED:  December 4, 2019