How do you select which columns are returned in a query? Can you specify the order of the columns returned? Learn the answers to these questions in this video.
- [Instructor] You can choose which columns to return … by listing columns in your select statement. … We'll be using the world database for this, … and I'm just going to say select asterisk from country, … and this selects all of the rows and all of the columns, … so when I press F9 to execute, … you'll notice we get 239 rows … and we get all of the columns in the table. … Now I can specify which columns I want … simply by listing them separated by commas, … so I can say name, continent, and region, … and when I execute this, … you see I get just those three columns. … I can use the as clause … to give an alias to a column, … and now when I execute this, … you'll notice that the name column now says country … in its heading. … I can list these in any order that I want. … For example, here, I can take region … and I can put it before continent, … and when I execute this, … you see that now region is before continent. … So I can list them in any order that I want. … I can even take name as country …
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.