Join Bill Weinman for an in-depth discussion in this video Bit type, part of MySQL Essential Training (2014).
…Support for a bit type began with MySQL version 5.03.…Before that the bit type was simply mapped to tiny int and didn't work very well.…Because of this legacy, it's gotten a bad reputation.…But as of MySQL 5.6, it works just fine, and it can be useful.…So we're going to start with the scratch database here.…And we're just going to create a simple table.…I'll start as always with the Drop Table If Exists.…
And we'll create a table and we'll give it a ID column, and a couple of BIT columns.…So I have here a three-bit column and a five-bit column, together three and five…is eight, so these two columns are going to just take up eight bits.…And they'll all be packed into one eight bit unit, into one eight bit byte.…The Bit type is designed to conserve space as much as possible.…You can define several columns of various bit lengths in a single table, and MySQL…will pack these into as few units…of storage as possible, usually on eight-bit boundaries.…
So let's go ahead and add some values to this.…Now we note that the largest decimal number you can express in…
- 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.