From the course: Database Foundations: Intro to Databases

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Mathematical operations

Mathematical operations

- [Instructor] You can include additional columns in a queries results set, that don't come from any data table in your database. Consider this query that I'm going to write on line number 10. Select and then in single quotes, Adam. If I run just this little bit here, you might be surprised that we actually get some results back and we just get the name, Adam. What we're doing is asking for the server to return a single value and not a column of data. And that's exactly what we're getting back. We can even give this column an alias in the results. I'll say as Name. Now, when I run this line we'll get a proper column name and the results. So this is a neat trick but actually it can be really useful to use inside of your queries. Let's get rid of line number 10 here, and I'll turn my attention back to the original query that I had in the math start dot SQL file. This query is retrieving a few columns from the…

Contents