From the course: SQL: Data Reporting and Analysis
Unlock the full course today
Join today to access over 24,900 courses taught by industry experts.
Use date functions with WHERE - SQL Tutorial
From the course: SQL: Data Reporting and Analysis
Use date functions with WHERE
- [Instructor] In this section, we're going to look at date functions and a little bit more about the data type of date as well. Date functions just mean a formula that can be run on fields that have a data type of a date kind. I've switched to the address table here from the actor table and that's because the actor table has just disappeared which is one of the problems of dealing with an online demo that anybody can use and something you may come across yourself as you follow the course. So the address table has an ID column, address as in street address, a district, a city ID, postcode and phone which appeared to be optional and then a last update column, which is a date. So it's got year, then month, then day. And then it has a time as well, hours, minutes, and seconds. Now it may seem obvious to you and I whether something is a number, text, or a date, but a database has to be told explicitly and in far more detail…
Contents
-
-
-
-
Retrieve data with SELECT5m 31s
-
(Locked)
Filter results with the WHERE clause5m 4s
-
(Locked)
Use LIKE, IN, and wildcards with WHERE5m 39s
-
(Locked)
Sort SQL results with ORDER BY1m 42s
-
(Locked)
Use string functions on your data6m 41s
-
(Locked)
More advanced string functions8m 35s
-
(Locked)
Change report headings with an alias2m 28s
-
(Locked)
Use date functions with WHERE8m 50s
-
(Locked)
Challenge: Query a table1m 7s
-
(Locked)
Solution: Query a table1m 23s
-
(Locked)
Challenge: Convert case50s
-
(Locked)
Solution: Convert case2m 30s
-
-
-
-
-