Fields aren't always named in a way that's useful. To fix that, there's the AS keyword.
- It's a little bit subtle, but the names of the fields…that we're getting back when we make a query…and subsequently the name of the fields we get in a…program or something we'd write,…are the names of fields or expressions that we…put into the statement to begin with.…Usually this makes sense,…but sometimes if we have a little bit of a lengthy way…of creating a field,…or want to be more clear in our output,…we can change the returned name of the field…with the as keyword.…Let's take a basic look at that with a statement…that will get us the first name and last name…of the participants in our people table.…
I'll write select.…First name.…Last Name.…From people.…Okay, that's a result that we've seen before.…Notice how the column headers here are the same…as the field names that I asked for.…First underscore name.…Last underscore name.…And if I transform the name a little bit,…say we'll make the last name uppercase,…the column header changes to match.…
And that can be helpful if you want to see…what you asked for specifically.…
- What is SQL?
- Asking for data with SELECT
- Limiting database responses
- Organizing responses
- Asking for data from two or more tables
- Understanding join types and data types
- Transforming data
- Performing math
- Adding and modifying data in a table
Skill Level Beginner
1. Ask for Data from a Database
2. Ask for Data from Two or More Tables
3. Data Types, Math, and Helpful Functions
4. Add or Modify Data
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
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.