In this tutorial we'll learn to determine the length of strings and also to insert strings within other strings through the LENGTH() and INSERT() functions respectively.
Пікірлер: 9
@archus117 жыл бұрын
Hey! I think the correct way is to tell the length of string which you want to remove in third argument so you don't loose characters after it. For example, insert('Hello word from space',7,5,'world') the result will be 'Hello worldfrom space' (space is removed also, because it's in 5th position starting from 7), but after insert('Hello word from space',7,4,'world') result is 'Hello world from space' .
@asimmohammad41466 жыл бұрын
About INSERT(): Some people say its a creepy function but I kind of like it.
@subbudgreat9 жыл бұрын
I think the third argument is more of how many characters that need replacement as when you give this query select insert('Hello Word', 7, 2,'World'): the output is 'Hello Worldrd' and when the third argument is given as 3, the output is 'Hello Worldd' and so on..so if we need to replace the entire word, we need to give in a value >=4(or
@ilasuba7897 жыл бұрын
very well organized video. I have one small question like if i have big string than how do i count position of the letter for sub string. I don't want to count manually. Is there any other way to count? Thanks for creating this tutorial.
@ancientsocrates8958 жыл бұрын
Your videos are very helpful...
@zoefaty21373 жыл бұрын
Good luck
@HamsterLoad10 жыл бұрын
Have you noticed that if you replace the 4 with a -1 you get the same ouput SELECT INSERT('Hello Word',7,-1,'WORLD') -> Hello WORLD
@LiuLinplus10 жыл бұрын
really!
@mukteshj18797 жыл бұрын
If the third argument is a negative number, the entire string starting thereon is replaced...