Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
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
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
0 Next important function is random function 1
Random function will help you generate a random number between 0 and 1 2
Zero will be included 3
And one will be excluded what this mean is whenever you are finding a random number 4
Zero is a possibility zero can come but one will never come 5
Random is the function which will give you a random number between 0 and 1 6
But many times 7
The random number that you want 8
Is not in the range of 0 and 1 9
You have different ranges 10
Of which you want a random number so 11
Probably you need a random number between 0 and 100 or 12
Say 10 and 20 13
If you want a random number between say 10 and 20 how do you get that 14
If you want a decimal random number, that is the random number that will be generated can have decimal values 15
You can write this query 16
Saying select random 17
So this random will give you a value between 0 and 1 18
You will multiply this value with the range so if it is 10 to 20 19
So it will be 20-10 20
So you multiply that random number with 10 21
and you add the 22
Lower 23
Value of the range so 10 is the lower range 24
so you add 10 25
So it will become random 26
Into * 27
10 + 10 28
This will give you a 29
Random number which will have decimal places most probably between 10 and 20 30
10 can occur 31
Because random value can have zero value so this can give you an output of 10 32
But 33
20 will never occur 34
20 will be excluded if you use this formula 35
Now suppose you want an integer value only 36
So how to get integer values from decimal 37
Just few minutes back we learnt the ceil and floor function 38
You can use the floor function here 39
To convert that decimal value 40
into 41
a Integer value 42
So, we multiply the random function 43
With (b - a + 1) this will ensure that 44
It is more than a 45
This product will give you value 46
More than one 47
So that 48
The lower value is more than a 49
+ a 50
So that will be lower range 51
So let us go and find out 52
a Random number between 10 and 50 53
First we will do the decimal part 54
So will be finding 55
Random numbers between the range of 10 and 50 56
The Range is 57
a is equal to 10 58
And b is equal to 50 59
So let's write select 60
First let us find a random number between 0 and 1 so random 61
This will give a random number between 0 and 1comma 62
Now let us find the decimal random number between 10 and 50 so the formula goes as 63
Random 64
Into 65
40 66
Why 40 because you have to multiply it with b-a 67
We have multiplied it with 40 68
then you add 69
The lower range which is 10 70
Next 71
let us find out the integer value between 72
10 and 50 73
So we will write floor 74
Within floors brackets we will write random 75
So we will multiply it by 40 76
+ 77
+ 10 78
This will exclude the 50 value. If you want to include 50 you have to 79
Add plus one here that will make it 41 80
What we are doing right now if we are getting a value between 10 and 50 but the 50 is excluded 81
So we will select these three values 82
And we will run these 83
So you will see the first column will have a value between 0 and 1 84
The second column has a value between 10 and 50 85
Third column has a value between 10 and 50 but it is an integer 86
If you rerun this, all these three values will change 87
Because that is what a random function is it will give you random values every time it is run
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.