Rename column name in SAS

Rename column name in SAS is accomplished using RENAME Keyword. Rename single column in SAS. Rename multiple column in SAS. Rename all the column in SAS.

We will be using the table name CARS.

Rename column name in SAS 1

Syntax:

RENAME old-name-1=new-name-1 <…old-name-n=new-name-n>;

 

Rename Column name in SAS

Rename multiple column in SAS is accomplished using RENAME keyword followed by old_column_name= new_column_name


data cars; 
set cars; 
rename MAKE = AUTO_MAKER 
       MPG=MILES_PER_GALLON 
       HP=HORSE_POWER 
       LUXURY=LUXURY_IND; 
RUN;

So the resultant dataframe with renamed column name will be

Rename column name in SAS 2