Flow control with CASE


show more Flow control with CASE provides you with in-depth training on Developer. Taught by Bill Weinman as part of the MySQL Essential Training show less
please wait ...

Flow control with CASE

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 SELE...

Flow control with CASE
Video duration: 4m 10s 4h 24m Beginner

Viewers:

Flow control with CASE provides you with in-depth training on Developer. Taught by Bill Weinman as part of the MySQL Essential Training

Subject:
Developer
Software:
MySQL
Author:
please wait ...