SQL Tutorial - 42: The LENGTH() & INSERT() Functions

  Рет қаралды 30,023

The Bad Tutorials

The Bad Tutorials

Күн бұрын

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
@archus11
@archus11 7 жыл бұрын
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' .
@asimmohammad4146
@asimmohammad4146 6 жыл бұрын
About INSERT(): Some people say its a creepy function but I kind of like it.
@subbudgreat
@subbudgreat 9 жыл бұрын
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
@ilasuba789
@ilasuba789 7 жыл бұрын
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.
@ancientsocrates895
@ancientsocrates895 8 жыл бұрын
Your videos are very helpful...
@zoefaty2137
@zoefaty2137 3 жыл бұрын
Good luck
@HamsterLoad
@HamsterLoad 10 жыл бұрын
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
@LiuLinplus
@LiuLinplus 10 жыл бұрын
really!
@mukteshj1879
@mukteshj1879 7 жыл бұрын
If the third argument is a negative number, the entire string starting thereon is replaced...
SQL Tutorial - 43: REPEAT() & REPLACE() Functions
2:25
The Bad Tutorials
Рет қаралды 31 М.
Brawl Stars Edit😈📕
00:15
Kan Andrey
Рет қаралды 11 МЛН
Nastya and balloon challenge
00:23
Nastya
Рет қаралды 23 МЛН
Electric Flying Bird with Hanging Wire Automatic for Ceiling Parrot
00:15
you need to learn SQL RIGHT NOW!! (SQL Tutorial for Beginners)
24:25
NetworkChuck
Рет қаралды 1,5 МЛН
SQL Window Functions in 10 Minutes
10:13
Colt Steele
Рет қаралды 75 М.
Using DISTINCT in SQL
8:53
Database by Doug
Рет қаралды 38 М.
Clustered vs. Nonclustered Index Structures in SQL Server
8:04
Voluntary DBA
Рет қаралды 653 М.
Learn SQL In 60 Minutes
56:24
Web Dev Simplified
Рет қаралды 2,1 МЛН
Basic Aggregate Functions in SQL (COUNT, SUM, AVG, MAX, and MIN)
5:44
Becoming a Data Scientist
Рет қаралды 87 М.
6 SQL Joins you MUST know! (Animated + Practice)
9:47
Anton Putra
Рет қаралды 153 М.
Brawl Stars Edit😈📕
00:15
Kan Andrey
Рет қаралды 11 МЛН