Join Bill Weinman for an in-depth discussion in this video Creating a simple subselect, part of MySQL Essential Training (2014).
…A subselect is effectively a nested select statement.…In SQL, the result of a select statement is effectively a table.…It usually just exists in memory but it can…always be used, as you would use a table.…Because of this, a select statement may be…used as a data source for another select statement.…This usage is called a subselect or sometimes a subquery.…For this lesson we'll be using the World Database.…And I'm going to copy and paste some code from the chapter eight exercise file.…And I'm just going to grab this much of…it, down to this first select statement there.…
Copy and paste it into the SID.…Go ahead and press go.…See, I create a temporary table called T.…It just has two columns, A and B.…And there are just six character strings.…And I've inserted three rows.…In column A we have state codes, followed by numbers.…And in column B we have country codes, followed by numbers.…And I have this select statement using substrings to break apart these pact…fields so effectively in column A we have two different pieces of information.…
- 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.