SAS table: Order of the columns

Retain

data table;
retain varc vard vara varb;
set tablea;
run;

  • The original column order is a-b-c-d.
  • The new column order is c-d-a-b.
  • Retain statement need to be placed before the set statement and not after the set statement.