TSQL- How to remove a character from a string


A string is a group of characters in a specified order, called sequence of characters.
This sequences are zero-indexed.

To remove a character from a string in TSQL use SUBSTRING.
The substring is a built-in function that takes, expression, starting point and length of the expression.
Based on those three parameters, it decides on what string to return



To remove the last character, what do you have to do?

Think about it, all you need to do is change the starting point value from 2 to 1.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

New Post

Create Store procedures

Store procedure has some similarities with views in the sense that it allows encapsulation. i.e. to retrieve for further, later use a series...