SQL Server STUFF Function | Practice SQL Queries | Scenario-16

preview_player
Показать описание
►Practice SQL Queries using 30 scenarios - FREE course

►SQL Learning Path:

►SUBSTRING explained with a scenario:

►CHARINDEX explained with a scenario:

►Complete Playlist - Learn To Write SQL Queries using scenarios:

►Get the Dataset to Practice SQL Queries:

----------------------------------------------------------------------------------------------------------------
SQL Server STUFF Function, inserts a string into another string. It deletes a specified length of characters in the first string at the start position and then inserts the second string into the first string at the start position.

Syntax:
STUFF ( character_expression , start , length , replaceWith_expression )
Рекомендации по теме
Комментарии
Автор

Thank you so much for this video series. It's very nice.
The STUFF Function is a bit confusing. I have to use the query below. Please does my own solution have any issue I need to take note of?

SELECT
EmailAddress,
CONCAT(
REPLICATE('x', CHARINDEX('@', EmailAddress) - 1),
RTRIM(
SUBSTRING(
EmailAddress,
CHARINDEX('@', EmailAddress),
LEN(EmailAddress)
)
)
) As MaskedEmail
from Person.EmailAddress

wazobiamanwazobiama
welcome to shbcf.ru