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 So now we will be starting with the quering commands 1
We started with query commands when we discussed select and where statement 2
If you remember, we retrieved data using the select statement 3
From a particular table and then we 4
Specified conditions using the where statement 5
Also we discussed the OR AND 6
Logical operators 7
Which helps specify multiple conditions on the where statement 8
Now we will be discussing the 'in' condition 9
In condition is used with the where statement 10
Just as the OR command 11
Only difference is 12
If you have multiple values and you want to specify a lot of values 13
You will have to specify or condition every time 14
If you have 50 values you have to write or condition 50 times 15
But with in 16
You can just try it in one time and you can specify all the 50 values 17
In a single block 18
So this is the syntax of in command 19
You select 20
The column names that you want from the table name 21
And then you write the where condition 22
And after that you specify the in command with all the values 23
Specified in one single block 24
So, this column name 25
That you specified with the where condition 26
This column can only have this value in the retrieved data set 27
So, let us look at some of the examples 28
For example in our customer table if I want to see 29
Which customers belong to the 30
City Philadelphia or Seattle 31
There are two ways to do that 32
One is to use the in statement 33
Where I'll write in and then write the two values Philadelphia and Seattle 34
The same thing I can 35
Do with the OR statement where I use where city is equal to Philadelphia Or city is equal to Seattle 36
You can imagine if I had 37
15 or 20 cities 38
I would have to write or statement 15 20 times 39
Whereas with in, I just put a comma and write the city name 40
Let us go and write this command in pg admin 41
So now 42
I will write the 43
In command, select star 44
From customer 45
Where 46
City 47
First is Philadelphia 48
And second one is Seattle 49
If you run this command 50
So you can see 51
In the city column 52
Only 53
Seattle and Philadelphia are present 54
All the other cities have been filtered out 55
We could have done the same thing using the or statement 56
Let us try this with the or statement 57
Select star from customer where 58
City is equal to Philadelphia 59
Or 60
City equal to Seattle 61
You run this, you will get the same result 62
So IN is basically a replacement for multiple or 63
But 64
In the later part of this course when will learn about sub queries 65
You find that in place a very important role 66
In writing Complex queries in a short and simple manner 67
In the next 68
Video we will learn about how to use the Between statement
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.