sqlms-accessms-access-2016

How to change column order when selecting * in ms access sql?


I have the following query

SELECT *, 1 AS test FROM tableName

It works fine but the test column is the first result, I'd like it to be after all the other columns. As far as I can tell this behaviour seems to be exclusive to ms-access, is there a way around it?


Solution

  • Alias could help

    SELECT a.*
    , 1 AS test 
    FROM tableName a