Join Bill Weinman for an in-depth discussion in this video Boolean values, part of MySQL Essential Training.
…MySQL doesn't have a Boolean type per se.…It does have a Boolean keyword which maps to a…tiny int which is then used as a Boolean type.…So, let's see how this works.…We'll use the scratch database here.…And we're going to go ahead and create a little table here.…We'll start with a DROP TABLE IF EXISTS.…And CREATE TABLE test and it's just going to…have two columns a and b and they're both Boolean.…
Actually just BOOL by itself is an alias for Boolean, either one works.…I like to spell things out.…And we're going to insert one row and just put in TRUE and FALSE, true and false.…They're just aliases for one and zero, and so true is one and false is zero.…And we'll SELECT FROM test, we'll DESCRIBE it, and we'll SHOW CREATE TABLE.…Go ahead and Go.…So here we have our select here which shows one and…zero, and our describe actually shows tiny end for both of…the values and you'll notice that it says tiny end one…which means that only one digit is going to be used there.…
And our CREATE TABLE shows that it's created with tiny and DEFAULT NULL.…
- 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
PHP with MySQL Essential Trainingwith Kevin Skoglund14h 32m 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.