Redgate logo
  • Products
    • All products
    • Redgate Flyway
    • Redgate Monitor
    • Redgate Test Data Manager
    • SQL Toolbelt Essentials
    • SQL
      • SQL Backup
      • SQL Clone
      • SQL Compare
      • SQL Data Catalog
      • SQL Data Compare
      • SQL Data Generator
      • SQL Dependency Tracker
      • SQL Doc
      • SQL Index Manager
      • Redgate Monitor
      • SQL Multi Script
      • SQL Prompt
      • SQL Provision
      • SQL Scripts Manager
      • SQL Search
      • SQL Source Control
      • SQL Test
    • .NET
      • .NET Developer Bundle
      • .NET Reflector
      • ANTS Performance Profiler
      • ANTS Memory Profiler
      • SmartAssembly
    • All products
      • .NET Developer Bundle
      • .NET Reflector
      • ANTS Memory Profiler
      • ANTS Performance Profiler
      • Data Compare for Oracle
      • Data Masker
      • Redgate Flyway
      • Redgate Test Data Manager
      • Schema Compare for Oracle
      • SmartAssembly
      • Source Control for Oracle
      • SQL Backup
      • SQL Clone
      • SQL Compare
      • SQL Data Catalog
      • SQL Data Compare
      • SQL Data Generator
      • SQL Dependency Tracker
      • SQL Doc
      • SQL Index Manager
      • Redgate Monitor
      • SQL Multi Script
      • SQL Prompt
      • SQL Provision
      • SQL Scripts Manager
      • SQL Search
      • SQL Source Control
      • SQL Test
      • SQL Toolbelt Essentials
  • Solutions
    • Overview
    • By Need
      • Standardize
      • Protect
      • Automate
      • Monitor
    • By Role
      • Development
      • Operations
      • IT Management
      • Enterprise leadership
    • By Industry
      • Tech
      • U.S. Federal
      • Australian Government
      • Healthcare
      • Managed Service Providers (MSP)
    • Case studies
    • Insights
  • Our Company
    • Overview
    • Careers
    • Contact us
    • Redgate blog
    • Newsroom
    • Leadership
  • Support
  • Learning & community
    • Learning & community | Redgate Hub
    • Product articles
    • University
    • Events
    • Forums
    • Community
    • Simple Talk
  • Buy now
    • See all products
    • Request a quote
    • Contact sales
    • My account
    • Shopping cart
  • Products
    • All products
    • Redgate Flyway
    • Redgate Monitor
    • Redgate Test Data Manager
    • SQL Toolbelt Essentials
    • SQL
      • SQL Backup
      • SQL Clone
      • SQL Compare
      • SQL Data Catalog
      • SQL Data Compare
      • SQL Data Generator
      • SQL Dependency Tracker
      • SQL Doc
      • SQL Index Manager
      • Redgate Monitor
      • SQL Multi Script
      • SQL Prompt
      • SQL Provision
      • SQL Scripts Manager
      • SQL Search
      • SQL Source Control
      • SQL Test
    • .NET
      • .NET Developer Bundle
      • .NET Reflector
      • ANTS Performance Profiler
      • ANTS Memory Profiler
      • SmartAssembly
    • All products
      • .NET Developer Bundle
      • .NET Reflector
      • ANTS Memory Profiler
      • ANTS Performance Profiler
      • Data Compare for Oracle
      • Data Masker
      • Redgate Flyway
      • Redgate Test Data Manager
      • Schema Compare for Oracle
      • SmartAssembly
      • Source Control for Oracle
      • SQL Backup
      • SQL Clone
      • SQL Compare
      • SQL Data Catalog
      • SQL Data Compare
      • SQL Data Generator
      • SQL Dependency Tracker
      • SQL Doc
      • SQL Index Manager
      • Redgate Monitor
      • SQL Multi Script
      • SQL Prompt
      • SQL Provision
      • SQL Scripts Manager
      • SQL Search
      • SQL Source Control
      • SQL Test
      • SQL Toolbelt Essentials
  • Solutions
    • Overview
    • By Need
      • Standardize
      • Protect
      • Automate
      • Monitor
    • By Role
      • Development
      • Operations
      • IT Management
      • Enterprise leadership
    • By Industry
      • Tech
      • U.S. Federal
      • Australian Government
      • Healthcare
      • Managed Service Providers (MSP)
    • Case studies
    • Insights
  • Our Company
    • Overview
    • Careers
    • Contact us
    • Redgate blog
    • Newsroom
    • Leadership
  • Support
  • Learning & community
    • Learning & community | Redgate Hub
    • Product articles
    • University
    • Events
    • Forums
    • Community
    • Simple Talk
  • Buy now
    • See all products
    • Request a quote
    • Contact sales
    • My account
    • Shopping cart

Redgate Test Data Manager

Improve your release quality and reduce your risk, with the flexibility to fit your workflow

Redgate Flyway

Bring stability and speed to database deployments

Redgate Monitor

Understand server performance in an instant with fast deep-dive analysis

See all our products

Overview

Redgate's end-to-end Database DevOps solutions

Protect

Reliable test data management, automating repetition out of the process

Automate

Automate and accelerate your database change management workflow

Monitor

Monitor your cross-database, multi-platform estate to ensure optimal performance

NEW REPORT 2025 State of database landscape cover

2025 State of the Database Landscape − download the report

Redgate Hub

  • Product articles
  • University
  • Events
  • Forums
  • Community
  • Simple Talk

Product articles
SQL Prompt
SQL Code Analysis

  • SQL Change Automation
  • SQL Prompt
  • SQL Code Analysis
  • Database Builds and Deployments

SQL Code Analysis from a PowerShell Deployment Script

This article shows how to define SQL code analysis rules using SQL Prompt and them run them automatically from a PowerShell script, displaying the detected code issues in a handy HTML report. Read more

  • SQL Prompt
  • SQL Code Analysis

Finding code smells using SQL Prompt: TOP without ORDER BY in a SELECT statement (BP006)

Using TOP in a SELECT statement, without a subsequent ORDER BY clause, is legal in SQL Server, but meaningless because asking for the TOP x rows implies that the data is guaranteed to be in a certain order, and tables have no implicit logical order. You must specify the order. Read more

  • SQL Prompt
  • SQL Code Analysis
  • Query Performance

Choosing Between Table Variables and Temporary Tables (ST011, ST012)

Phil Factor demonstrates the use of temporary tables and table variables, and offers a few simple rules to decide if a table variable will give better performance than a temp table (ST011), or vice-versa (ST012). Read more

  • SQL Prompt
  • SQL Code Analysis

Avoid use of the MONEY and SMALLMONEY datatypes (BP022)

Use of the MONEY and SMALLMONEY datatypes can lead to unintentional loss of precision, due to rounding errors, during calculations. It is generally far better to use the DECIMAL, a.k.a. NUMERIC, type. Read more

  • SQL Prompt
  • SQL Code Analysis
  • Query Performance

When to use the SELECT…INTO statement (PE003)

SELECT…INTO is a useful shortcut for development work, especially for creating temporary tables. However, it no longer has a clear performance advantage and should be avoided in production code. It is better to use a CREATE TABLE statement, where you can specify constraints and datatypes in advance, making it less likely that inconsistencies will sneak into the data. Read more

  • SQL Prompt
  • SQL Code Analysis
  • Exploring and Refactoring Databases

Driving up database coding standards using SQL Prompt

A strategic view of how a development team can use SQL Prompt to establish and share coding standards, through code analysis rules, formatting styles and code snippets. Read more

  • SQL Prompt
  • SQL Code Analysis
  • Query Performance

Consider using [NOT] EXISTS instead of [NOT] IN with a subquery (PE019)

Phil Factor explains why you should prefer use of EXISTS over IN, when comparing data sets using a subquery. While there is no longer any significant performance advantage, using NOT EXISTS will avoid unexpected results when the subquery’s source data contains NULL values. Read more

  • SQL Prompt
  • SQL Code Analysis
  • Query Performance

Misuse of the scalar user-defined function as a constant (PE017)

The incorrect use of a scalar UDF as a global database constant is a major performance problem and should be investigated whenever SQL Prompt spots this in any production code. Unless you need to use these global constants in computed columns or constraints, it is generally safer and more convenient to store the value in an inline table-valued function, or to use a view. Read more
SQL Prompt - Code Analysis Rules Screenshot
  • SQL Prompt
  • SQL Code Analysis

Avoid T-SQL Technical Debt using SQL Prompt Code Analysis

SQL Prompt can help prevent the build-up of technical debt in your database code. It alerts the team immediately to issues that might not prevent your code from working as expected, but could eventually cause problems with performance, or maintenance, or even security. Read more

  • SQL Prompt
  • SQL Code Analysis
  • Query Performance

Finding code smells using SQL Prompt: the SET NOCOUNT problem (PE008 and PE009)

Generally, you should prevent rowcount messages being sent, by adding a SET NOCOUNT ON at the start of every stored procedure, trigger and dynamically executed batch. Phil Factor demonstrates, and explains the nuances and exceptions. Read more

Products

  • SQL Change Automation
  • SQL Data Generator
  • SQL Prompt
  • SQL Test
  • SQL Toolbelt

Filter by level

NextPrevious
  • 1
  • 2
  • 3
  • 4
  • 5

Redgate Hub

  • Product Articles

    Product Articles

    Tips and how-to guides for Redgate products

  • University

    University

    Easy to follow video courses

  • Events

    Events

    Join us online, or get sponsored

  • Forums

    Forums

    Ask, discuss, and solve questions about Redgate's tools

  • Community

    Community

    Develop your skills and meet Redgate Advocates and Friends

  • Simple Talk

    Simple Talk

    In-depth articles and opinion from Redgate's technical journal

Products

  • Standardize
  • Automate
  • Monitor
  • Test Data Management

Support

  • Forums
  • Contact product support
  • Find my serial numbers
  • Download older versions

Solutions

  • Overview
  • Protect
  • Automate
  • Monitor
  • Maturity Assessment

Our Company

  • Careers
  • Contact us
  • Redgate Blog
  • Our values

Community & Learning

  • Product Learning
  • University
  • Events & Friends
  • Simple Talk
  • Books
  • Forums

Partners

  • SQL Server Central
  • Resellers
  • Consulting partners

Trust Center

  • License agreement
  • Privacy and cookies
  • Modern slavery statement
  • CCPA - Limit the use of my sensitive personal data / do not sell my data

Follow us

Redgate on Twitter Redgate on LinkedIn Redgate on YouTube
  • Copyright 1999 - 2025 Red Gate Software Ltd