How to Select All Columns in a Row in SQL

See SQL: Tips and Tricks for similar articles.
Looking to improve your SQL skills? Check out Webucator’s SQL classes.

You might wish to select all the columns in each row of a table in your SQL select statement. The syntax for accomplishing this task is straightforward because it does not require itemizing each column defined for the table.

To learn how to select all columns in a table row in an SQL select statement, follow these steps:

  1. You'll need to setup the MySQL database tables. The instructions for the setup can be found in the topic How to add comments in simple SQL selects. Follow steps 1 through 7 in this topic before proceeding to the next step.
  2. Now you will learn how to select all columns for each row of a table.
  3. Type in the following SQL statement: Select all columns exampleYou will see in the output all the columns for each row of the Cities table. By coding * after the select keyword you requested that all columns be displayed on the report.

Related Articles

  1. Reset Root Password in MySQL on Windows
  2. How to Create an ER Diagram for a MySQL Database with Free Tools
  3. How to Round Up in SQL
  4. How to Concatenate Strings in SQL
  5. How to Select All Columns in a Row in SQL (this article)
  6. How to Check Multiple Conditions in SQL
  7. How Work with White Space and Semicolons in Simple SQL Selects
  8. How to Sort Records in SQL
  9. How to Write Subqueries (Simple and Correlated)