Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

RIGHT Function in SQL Server: What You Need to Know

Understand RIGHT Function in SQL Server with clear explanations, practical examples, and useful tips. This updated guide covers the essential concepts and...

Table of Contents

RIGHT Function in SQL Server is easier to understand when the core ideas are paired with practical examples. The sections below explain the topic clearly, highlight useful steps, and point out details that can prevent common errors.

The article will explore and guide you how to use the RIGHT function in SQL Server to extract some characters from the right side of a given string.

Describe

The RIGHT function in SQL Server allows you to extract a substring from a large string, starting from the rightmost character.

Syntax

To use the RIGHT function in SQL Server, we use the following syntax:

 RIGHT(chuoi, so_ky_tu) 
 SELECT RIGHT('TipsMake.com', 11); 
 Result: 'trimang.com.' 
 
 SELECT RIGHT('TipsMake.com', 4); 
 Result: '.com' 
 
 SELECT RIGHT('Tipsmake', 9); 
 Result: 'Tri Mang ' 
 
 SELECT RIGHT('Tipsmake', 100); 
 Result: 'Tipsmake ' 

FAQ

What should you know about describe?

The RIGHT function in SQL Server allows you to extract a substring from a large string, starting from the rightmost character.

What should you know about syntax?

To use the RIGHT function in SQL Server, we use the following syntax:

What is RIGHT Function in SQL Server?

The article will explore and guide you how to use the RIGHT function in SQL Server to extract some characters from the right side of a given string.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.