SQL provides a rudimentary conditional expression. It is cumbersome but it works well for many use cases.
- [Instructor] SQL provides a form … of conditional expression. … It's a little cumbersome, but here's how it works. … We're going to use the test database for this today, … and we're going to create a simple table … called "booltest". … It has two integers, A and B, … and it has one row with two values, one and zero. … So when I execute all of this, you see we have the one row … where A is one and B is zero, just as expected. … So now we're going to use this … to demonstrate the conditional expression. … The conditional expression in, there's actually two forms, … which you can see here, of conditional expression in SQL. … The first one we're going to look at, … both of them use the case keyword, … the first one says, "Case when A then true else false end". … And that's, the conditional expression … is just this part right here. … So, we're testing A, whether it's true or false. … So this could be any expression, it could be A equals one, … A is greater than five, B is less than three, …
This course was created by Bill Weinman. We are pleased to offer this training in our library.
- How databases are organized
- Selecting rows and columns
- Creating new tables
- Inserting and updating data
- 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
- Using CRUD functions
Skill Level Beginner
2. SQL Overview
3. Fundamental Concepts
7. Dates and Times
Dates and times2m 6s
11. Views and Subselects
12. 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.