Home > Articles > Data > SQL

  • Print
  • + Share This
This chapter is from the book

Retrieving All Columns

In addition to being able to specify desired columns (one or more, as seen above), SELECT statements can also request all columns without having to list them individually. This is done using the asterisk (*) wildcard character in lieu of actual column names, as follows:

Input icon.jpg

SELECT *
FROM Products;

Analysis icon.jpg

When a wildcard (*) is specified, all the columns in the table are returned. The column order will typically, but not always, be the physical order in which the columns appear in the table definition. However, SQL data is seldom displayed as is. (Usually, it is returned to an application that formats or presents the data as needed). As such, this should not pose a problem.

  • + Share This
  • 🔖 Save To Your Account