I’m not sure i understand the question – you say you are building a table but you don’t say how you are building a table. Is this a memory array? Is it a physical table in a database? A spreadsheet or what? If you are reading a file with data in no particular sequence and storing that data in a database table then the order it is stored in the table really makes no difference. A query statement against the table to retrieve the data is where you would sort the data with an “order by” clause. I would like to know how you are populating your table from the file and tell me also what kind of file you are using. If the file is just plain text, comma delimited text, etc. There are a bazillion ways to manipulate data. Please be more specific.
Also, if you are creating a database table from the data your db software should possibly have indexing features to improve the data retrieval with your select statement containing the order by clause. If you insist on making the table be “sequential” the create a temporary table from the file and then create a permanent table from the temporary table by using a select statement that orders the data, e.g.:
table A with one column has 4 rows with (apparently) nonsequetial data –
You would create a table B with the data sorted in descending order like this:
create table B as select * from table A order by widget_id desc