Table of Contents

    How to Use the RIGHT() Function in SQL Server: A Comprehensive Guide

    How to Use the RIGHT() Function in SQL Server: A Comprehensive Guide

    Syntax:

    
    RIGHT(Character_Expression, Integer_Expression)
    

    Returns the specified number of characters from the right hand side of the given character expression.

    Code:

     Select RIGHT('ABCDE', 3)
    
    

    Output:

    The above code will produce the following result-

    
     CDE