Skip to content
No results
We use cookies to ensure that we give you the best experience on our website.

# SQL Refactor: rename column and table

- admin
- November 29, 2010
- sql pretty printer
- 1 Comment

We begin to introduce features of SQL Refactor since Version 3.2.0.
The first feature we added in Version3.2.0 is rename column and table of SQL script.

SQL Pretty Printer is able to rename column and table in complex SQL including nested subquery, joins, parameters in function call, stored procedures and anywhere in the SQL script.

Usually, search and replace functions in the most modern editors can’t do this job well. Take the following SQL for example:

    SELECT Persons.Name, Orders.Name
    FROM Persons
    LEFT JOIN Orders
    ON Persons.P_Id=Orders.P_Id
    ORDER BY Persons.Name

If you want to rename column Persons.Name to Persons.firstName, By using replace function in editor will replace all Name in this SQL script that also including Orders.Name which is incorrect.

By using rename column feature in SQL Pretty Printer, it will be much easy and safe to rename Persons.Name in the select list and order by clause to Persons.firstName while leaving Orders.Name untouched.

Have a try of SQL Pretty Printer Now

Screen shots of this awesome features

Rename column name

After rename column name

### Newsletter Updates

Enter your email address below to subscribe to our newsletter

I accept the Privacy Policy

### Related Posts

#### NEW RELEASE: SQL PRETTY PRINTER VERSION 3.3.3

- September 19, 2012

#### NEW RELEASE: SQL PRETTY PRINTER VERSION 3.3.2

- July 18, 2012

#### SQL Pretty Printer works when Multi-SSMS installed

- July 5, 2012