From the course: From Excel to SQL

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Identifying columns in SQL

Identifying columns in SQL

From the course: From Excel to SQL

Identifying columns in SQL

- So let's say you want to narrow down your data to focus on some specific information. One of the things you can do is reduce the number of columns returned by your SQL query. So you're only looking at the data you want to see. Now, if you were doing this in Excel, you might choose to hide a column of data to remove it from view. You can perform a similar operation with your SELECT statement, but instead of hiding that column, what you're actually doing is not including that column in your query. So let's look at an example to understand how this works. Let's say you want to return only the first names of the employees within this database. All you need to do is write SELECT first_name From Employees and then execute the query. Now, you can see in the results that only the first_name column has been returned. Okay, for this next query, what we're going to do is return the first and last names of each employee, and to do that, what you would do is add the last_names column to the…

Contents