You'll receive

Bi-weekly updates

Exclusive discounts

Product update alerts

SQL formatter with over 160 options
Qualify objects and expand wildcards
Encapsulate SQL into procedures
Add surrogate keys
Replace one-to-many relationships
Change procedure parameters
Safely rename SQL objects
Locate & highlight unused variables
Format SQL objects


Advanced SQL formatting

SQL code formatter with over 160 customizable options

See next feature

Impact analysis

Preview the impact of changes with difference highlighting

See next feature

Formatting profiles

Save and quickly toggle between different sets of formatting settings

See next feature

Batch formatting of SQL objects

Allows the formatting of all script based objects e.g. stored procedures, in a database, quickly and easily

See next feature

Batch SQL scripts formatting

Format SQL scripts and script folders in batches

See next feature


Make SQL code less readable

See next feature

Wildcard expansion

Transform * wildcards into explicit lists of column names

See next feature

Object name qualifying

Qualify columns with schema table names and schema or aliases

See next feature

Find unused variables and parameters

Clean up your code by identifying and removing parameters and variables that aren’t used

See next feature

Safe rename

Rename tables, procedures, views, functions and columns risk-free

See next feature

Add surrogate key

Replace complex, multi-column primary keys with a single column surrogate key

See next feature

Replace one-to-many relationships

Add a new associative table to replace one-to-many relationships

See next feature

Change parameters

Add, remove or change parameters without breaking dependencies from referencing objects

See next feature

Encapsulate SQL

Convert blocks of SQL code into scalar or table functions, stored procedures and views. Automatically identify and create the input parameters

See next feature

Split table

Improve your database design and make large tables more manageable by partitioning them

See next feature

Copy SQL code as

Render T-SQL into its Java, C#, C++, VB .NET, PHP, Ruby, Delphi or PowerBuilder equivalent

See next feature


Solution center articles

SQL Refactoring techniques – How to split a table in SQL?

SQL database refactoring techniques – Rename method

SQL database refactoring techniques

Rules of SQL formatting – SQL naming conventions and capitalization rules

Rules of SQL formatting – SQL code commenting

Rules of SQL formatting – Commas and spacing in T-SQL

Rules of SQL formatting – Terminating SQL statements with semicolons

How to format SQL like a pro – formatting to implicit Microsoft standards and guidance

SQL code refactoring – ways to improve database performance – Part 1

SQL code refactoring – ways to improve database performance – Part 2

SQL code refactoring – ways to improve database performance – Part 3

Rules of SQL formatting – Regular and delimited T-SQL identifiers

SQL Formatting standards – Capitalization, Indentation, Comments, Parenthesis

SQL Formatting standards – joins, lists, structure, operations

Changing SQL stored procedures and functions parameters without breaking dependencies

Quickly convert SQL code to language-specific client code

How to prevent performance problems and errors due to wildcards in SELECT statements

Clean up SQL code from variables you don't use

Improve the performance of your SQL queries by qualifying object names

Secure your stored procedures against SQL injection

SQL code refactoring – ways to improve database design

How to rename database objects in a SQL Server database safely – Part 1

How to rename database objects in a SQL Server safely – Part 2

Replacing one-to-many relationships with association tables automatically– Part 1

Replacing one-to-many relationships with association tables automatically – Part 2

How to format a SQL query to qualify object names explicitly

SQL query basics – How to improve readability by formatting commas, spacing and alignment

SQL query basics – How to improve readability by formatting capitalization and object naming

How to safely modify SQL stored procedure and SQL function parameters

How to refactor a SQL Server database table to add a surrogate key

How to clean up SQL database code by removing unused parameters

How to refactor a SQL Server database by splitting a table

How to clean up SQL database code by removing unused parameters

SQL database refactoring – Finding and updating internal references

SQL database refactoring – Introduction

SQL database refactoring techniques – Replacing a natural key with a surrogate key

How to format all SQL objects in your database

See more solution center articles


That did the trick - very, very, very cool!!!! Being very particular about formatting my SQL makes this product a definite buy because it can support almost endless formatting scenarios!

Joe Salvatore


The Stellar Group

The ApexSQL Refactor is a great help, and I'm glad to have found something that works well and is easy!

Alex Gadea

Sr. VP of Operations

Hostcentric Inc.

Great product. I can't wait to see what you'll add next!

John Beatty

Big Foot Software Research and Development

Carson City, NV VP Database Services

I'm a user of ApexSQL Refactor and I find it a really wonderful product.


Software Developer Consultant

I tried the ApexSQL Refactor product and liked it a lot. This is something I have been thinking would make my life a lot easier.

Mathias Hedlund

System Developer

Jeeves Information Systems AB

Whether or not I get the privilege of becoming part of your paying ApexSQL team, I’m already a free member who loves your Refactor and Search immensely! :)

Dan Yoachelson

SQL Developer

Logexsoft, Inc.

I used ApexSQL Complete and ApexSQL Refactor. Both are well designed and include all the modern feature compare to other competitors. I found tons of customization options that makes your tools powerful.

Mohammad Sanati

Software & Database developer

I’ve been using sql refactor for many years now and love it! When working in a team of developers, I use to get caught up/side tracked/lost in the “uniqueness” of each developer’s sql style. After I started using sql refactor, that was never the case again. Now we pass it around, reformat, and can work on it in our styles.

James Richardson

Database Programmer Analyst

I tried out Refactor, and it’s awesome!

Dan Yoachelson

SQL Developer


I mainly use Refactor as it saves me a lot of time making my code easier to read. I could of course do this as I go along but it is much more time consuming (and I don't have much time!).

John Worrall

Technical Support Executive

I just created account on Your site and minutes later I had ApexSQL Complete and Refactor installed. I must say I was amazed what those apps can do and that they are free. Thanks for whole team for creating such amazing software and for releasing it for free. You guys are amazing!

Tomasz Jagusz

See all of our

Killer FREE
SQL tools

ApexSQL Complete

SQL auto-complete

ApexSQL Refactor

SQL Formatting and refactoring

ApexSQL Search

SQL text and object search

Formatting screen mockups and examples

This datasheet contains mockups and examples for the most important formatting options in ApexSQL Refactor, such as Comments, Capitalization, Expressions, Schema Statements, Data Statements, Joins, and more


ApexSQL Redgate®
SQL Server editions
      SQL Server Management Studio
      Visual Studio
Formatting options 262 54
      Indentation 3 3
      Wrapping 1 1
      Aliases 4
      Capitalization 23 15
      Comments 8
      Data types 3
      Expressions 53 8
      Flow control 13 1
      Joins 16 3
      Lists 100
      Parentheses 10 2
      Spacing and Empty lines 8 5
      Statements 30 18
      Variables 4
Formatting features
      Batch SQL objects formatting
      Batch SQL scripts formatting
      Impact preview
      Profiles 3 1
      Encapsulate code as: Stored procedure
      Find unused variables and parameters
      Object name qualifying
      Safe rename
      Split table
      Add surrogate key
      Change parameters
      Copy SQL code
      Encapsulate code as: Table inline function
      Encapsulate code as: Scalar inline function
      Encapsulate code as: View
      Replace one-to-many-relationship
Free $369

ApexSQL Refactor 2016.01

Redgate® SQL Prompt 7

Comparison was conducted on January 20, 2016

Redgate® SQL Prompt also includes Auto-complete. For a comparison of this functionality set click here

Disclaimer: All product and company names are trademarks or registered® trademarks of their respective holders.
ApexSQL is not affiliated, associated, authorized, endorsed by, or in any way officially connected with other companies listed or any of their subsidiaries or affiliates