Join Bill Weinman for an in-depth discussion in this video Enumeration types, part of MySQL Essential Training (2014).
…MySQL provides two unique types that work from lists of strings.…So let's learn about them using the scratch…data base and start by creating a table.…And of course I will drop table if exists, and we'll call it test.…Create table test.…I'll have an id column and ENUM column.…So ENUM works from a list of strings, and the column…can hold in each row one of these strings in the list.…
And so I'll give it a list of strings here.…Pablo, Henri, and Jackson.…And no comma after that last column in the definition.…And so we can insert into test, values.…And so I can put Pablo, Henri, or…Jackson, but no other string's valid in this column.…And then we'll select star from test, and press go.…So here we have three rows, and column haze Pablo, Henri, and Jackson.…
Now, what's interesting here, it's actually being stored.…Because we could have a lot of columns.…We could do this again, we could just copy and paste these three again.…And I now have six rows.…Right?…I can have these same values many times throughout them.…And I don't need to store these strings over and over again.…
- 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.