For example I have this query:
The field called Sort should be generated and doesn't exist in MyTable. I want "Sort" to be auto numbering field which will start from 0 and then increment it self by 2 every next row, so when I get the results, Sort will contain, 0, 2, 4, 6, etc...Code:SELECT Sort, Field1, Field2 FROM MyTable WHERE Field1='2' AND Field2='1'
How can I do that inside SELECT statement without creating new table?
Or should I create a helper table which will have Sort as PRIMARY KEY and it will be AUTOINCREMENT?




Reply With Quote
