Learn how counting rows is accomplished with the COUNT() function. Discover how the special case COUNT(*) function, with an asterisk, counts all rows.
- [Narrator] If you want to count rows…instead of listing them you may use the count function.…Select the world database here and…if I simply say select * from country:…You've seen this already, we get 239 rows.…If instead I say select count (*) from country:…we get one row with the number 239 in it.…Now this can be useful when I…wanna do things like find out how many…of these rows have countries where…the population is greater than a million,…and I can simply say where population > 1000000…and when I go I see I have 154 countries…with a population greater than a million,…and if I wanna find it for greater…than 100 million of course I can just…change that and now I get ten countries.…
Or if I wanna find out how many of those…are in Europe I can say and continent equals…and Europe in quotes, and only one of those.…Maybe if I change that one million,…then of course we have 35 of them.…So you'll notice here that I have this…asterisk in the count function…and so when the asterisk is there…I get al 239 rows, but if instead…
- Understanding SQL terminology and syntax
- Creating new tables
- Inserting and updating data
- Writing basic SQL queries
- Sorting and filtering
- Accessing related tables with JOIN
- Working with strings
- Understanding numeric types
- Using aggregate functions and transactions
- Automating data with triggers
- Creating views
- Defining functions in PHP
Skill Level Beginner
2. SQL Overview
3. Fundamental Concepts
7. Dates and Times
Dates and times1m 52s
11. Views and Subselects
12. Defined Functions
13. A Simple CRUD Application
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.