Sometimes developers use ordinal number of the column instead of actual column name in the SELECT statement.
For example, consider the following statement
SELECT emp_id, first_name,dob, address from employees
When a front end application executes this statement it receives a resultset from the server with the exact column names given in the SELECT statement. Front end application can access the column names using the actual column name or the ordinal position in the SELECT statement
Consider the following code in a VB Application
Dim con as new ADODB.Connection
Dim rs as new ADODB.Recordset
con.connectionstring="connection string"
set rs=con.execute("SELECT emp_id, first_name,dob, address from employees")
We can now access the column name as
msgbox rs("emp_id")
msgbox rs("dob")
or
msgbox rs(1)
msgbox rs(3)
Now see what happens when column orders are chaged in the SELECT statement
set rs=con.execute("SELECT address, dob, first_name,emp_id from employees")
msgbox rs("emp_id")
msgbox rs("dob")
will give the correct results whereas
msgbox rs(1)
msgbox rs(3)
will give wrong result for emp_id and dob becuase now 1 refers to address and 3 refers to first_name. So it is always a best practice to use actual column names instead of ordinal position