Databases Reporting with SQL Working with Text Practice Session

Remi Vledder
Remi Vledder
12,975 Points

Is it possible to UPPER(<column>) a single column, and returning all other columns without having to specify them?

In the course example the following query:

SELECT * from movies;

would return:

id  title   year_released   genre
1   Alien   1979    Sci Fi
2   Aliens  1986    Sci Fi
3   Moulin Rouge    2001    Musical
4   Guys and Dolls  1955    Musical
5   Mama Mia    2008    Musical
6   Starman 1984    Sci Fi
7   Tron    1982    Sci Fi
8   Die Hard    1988    Action

Then to make the title column uppercase you could do:

SELECT UPPER(title) AS title FROM movies;

Now if you'd like to return the entire table, you could do something like this:

SELECT id, UPPER(title) AS title, year_released, genre FROM movies;

This would mean you'd have to add all the columns with the name in the query.

Now, would it also be possible to somehow shorten this using the * wildcard or something?


-- this doesn't work, but something similar perhaps
SELECT *, UPPER(title) AS title FROM movies;