MicrolearnENPTES

Choosing columns

Lesson 2 of 24 · SQL.Micro

Most of the time you only need a few columns. List them after SELECT, separated by commas, in the order you want them.

Rename a column in the result with AS: price AS cost.

You can compute new columns: price * stock AS stock_value.

Check yourself

Which query returns the columns in the order city, name?

Show only the name and price of every product.

Do it in the browser: a real SQL tool, a short mission and instant feedback. No install.

Start this lesson — free
← Your first SELECTFiltering rows with WHERE →

All lessons · SQL.Micro