Join Bill Weinman for an in-depth discussion in this video Flow control with CASE, part of MySQL Essential Training.
…MySQL supports the standard SQL conditional expression syntax.…This is not really a function, but I'm…covering it here because it's important to understand it.…The syntax is a little cumbersome, but here's how it works.…We're going to use the scratch data base for…this, and we're going to create a little table.…We'll destroy it later.…Create table, and we'll call it booltest.…Bool for Boolean, and we'll give it two…simple columns integers, and we'll insert a couple…values into it just a one and a zero we're going to be using these as Boolean values.…
In MySQL a one is a Boolean true.…And a zero is a Boolean false.…Actually, zero is false.…And anything else is true.…But one is traditionally used for true.…And so we'll select from our booltest.…So we can see the values here.…And so, there's our table.…And it has two values in one row, a one and a zero.…We're going to use this to test our conditional expression.…So, I'm going to go ahead and create a SELECT statement here.…
And I'm going to put the body of the SELECT statement.…
- Writing queries
- Creating and updating databases and tables
- Using MySQL built-in functions
- Sorting and filtering data
- Updating tables with triggers
- Working with subselects and views
- Creating and using a stored function
Skill Level Beginner
1. Installing and Configuring the Test Environment
2. Basic Syntax
3. Creating a Database
4. MySQL Data Types
5. MySQL Functions
8. Subselects and Views
9. Stored Routines
10. PHP's PDO Interface with MySQL
- 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.