Fully automated column order and SQL