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 In the last video we learnt how to update rows in a table 1
now let us see how to delete one or more rows from a Table 2
To delete rows, delete query is used. The syntax of delete query is 3
Delete from 4
Mention the table name 5
and then give the condition 6
for the rows to be deleted 7
Condition will be given again using the 8
Where clause 9
Let us see some example 10
If you want to delete a single row 11
We can just run a query 12
to delete from customer table 13
Where customer ID is 14
six 15
If you want to delete multiple rows 16
Say 17
If you want to delete all the customers who are less than 25 years old 18
We will write delete from customers 19
From customer table where 20
Age is less than 25 21
If you want to delete all the rows of the table 22
we will use 23
Delete 24
From customer table and not mention any condition 25
Let's go to PG admin and write these 3 queries 26
Now let us delete the customer with Customer Id 6 27
We'll write delete from 28
Customer table 29
Where 30
Cust ID 31
Is equal to 6 32
Let us run this 33
And let us see the result 34
If you remember earlier we had 10 records after deleting this one record 35
We'll be having 36
9 records 37
We have 8 records in the result because 2 customers had customer ID 38
Six 39
Now 40
If you want to delete, all the customers 41
Whose age is more than 30 years 42
So if we look at the data 43
Customer with customer ID 1 44
And customer ID 45
8 46
Customer ID 4 47
These three customers have 48
age more than 30 years. Let us delete these three customers from our database 49
Delete from customer table 50
Where age 51
is equal to 52
age greater than 30. Let's run this. 53
It ran successfully 54
Let us run the 55
Select query 56
You can see only 57
5 remain 58
earlier we had 8. 3 customers had age more than 30. Now no customer has age more than 30 59
You can delete all the rows of this table 60
To do that 61
we will not specify any condition we will just 62
Tell it to delete 63
From customer table and that's it 64
If we run this query everything from the table will be deleted 65
Let us run this select command 66
You can see only column names are there 67
That's all 68
what this table now has, it has no rows 69
No data in it 70
So that's how you delete data from a Table 71
In the next lecture 72
We will learn, how to change 73
The 74
Structure of the table 75
Structure of the table is comprised of the columns column names or the constraints 76
added to the columns, all these constitute the structure of the table and we will learn how to change the structure of the table
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.