Subselects are a convenient way of making your data available in different forms, while keeping your database schema simple and well-organized.
- [Instructor] Subselects are effectively nested queries. … In SQL, the result of a select statement … is effectively a table and can always be used … as you would use a table. … Because of this, a select statement may be used … as data source in another select statement. … This usage is called a subselect. … Let's take a look at an example. … Here in the world database, I've pasted some statements … from the chapter 11 exercise files, … and we're using the world database. … And we're just creating a simple table … and adding some rows to it. … And you'll see this table has three rows and two columns, … and each of the columns has two characters and four digits. … And we're using this select statement here with substrings … to split apart the characters from the digits, … and you see the result is … two letter state code and S code digits … and a two letter country code and C code digits. … And so we've taken these two columns, … and we made them into four columns … with this select statement. …
This course was created by Bill Weinman. We are pleased to offer this training in our library.
- How databases are organized
- Selecting rows and columns
- Creating new tables
- Inserting and updating data
- Sorting and filtering
- Accessing related tables with JOIN
- Working with strings
- Understanding numeric types
- Using aggregate functions and transactions
- Automating data with triggers
- Creating views
- Using CRUD functions
Skill Level Beginner
2. SQL Overview
3. Fundamental Concepts
7. Dates and Times
Dates and times2m 6s
11. Views and Subselects
12. A Simple CRUD Application
- 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.