Home

Columns should be aliased

Rule description

  • Columns should be aliased

 

Non-compliant Code Example

SELECT
    NAME ,    --Non compliant code (Columns without aliased)
    ADDRESS ,
    CREDIT_LIMIT
FROM
    CUSTOMERS

Compliant Code Example

SELECT
    NAME as nameCol,    --Compliant code (Columns with aliased)
    ADDRESS as addressCol,
    CREDIT_LIMIT as creditLimitCol
FROM
    CUSTOMERS
Visual Expert 2020
 VEPLSQLRULE160