Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
0 Next we are going to discuss the Replace function 1
Replace function is used 2
To replace 3
Occurrences of 4
a set of characters within a particular string to some other set of characters 5
So it is just like the find and replace in your Microsoft word or any other text 6
Editor where you will find a particular string 7
Within your document and it'll change 8
Every 9
Occurrence of that string to a new string 10
in the syntax also you can see 11
So you write replace 12
and then you mention the string. So this will be a string or column in your database 13
After that you mention the string to be replaced 14
And after that you mention the string 15
Which will come in place of that earlier string 16
Remember that replace function is case sensitive 17
What I mean by that is not this part of replace is case sensitive this you can write in any case but 18
The string that you are mentioning here and the string your mentioning here whatever case you mention in this 19
Part 20
It will check the string in that particular case only 21
and whatever case you mention in this string it will replace it with that same string 22
If you have upper case 23
All 24
Replacements will be uppercase 25
So for example 26
In the country list we have United States 27
If you want to replace United States with US 28
This is how we can do it 29
We will select customer name 30
We have selected country also so that we can 31
Check that earlier it was United States 32
And we'll replace 33
Country 34
This is the column name country from United States 35
To US 36
And this new column will be named as country new 37
and this is from the customer table. let's go and write this 38
select customer name, the country 39
and replace 40
Column name 41
Previous string which is United States 42
and the new string which is US 43
This column will be named as country new 44
Run this query 45
And you can see 46
The third column 47
We have US everywhere there is United States 48
Just to check that this is case sensitive we will replace the 49
U 50
The capital U of United States to 51
Lower U and we will run this query 52
You can see that it has not been able to replace the column 53
The column was supposed to contain US after replacing United States 54
But it was not able to replace it so it has given just United States to us 55
This is where you can also use upper and lower functions 56
So if you are not sure about the case of the column that you are mentioning you just right lower 57
On this column name 58
So all the values of this column name will become lowercase and you mention here the 59
String in lowercase. So this will help you replace all the United States 60
in whichever case it is 61
to US 62
You can see that we have successfully replaced United States with US 63
However this is 64
only in the resultset this has not replaced the values in the table if you want to replace the value in the 65
table, you have to use update table command 66
That's all about replace function
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.