• google plus

How to Select All Columns in a Row in SQL

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 example
    You 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.
Author: Stephen Withrow

Stephen has over 30 years' experience in training, development, and consulting in a variety of technology areas including Java, C, C++, XML, JavaScript, AJAX, Tomcat, JBoss, Oracle, and DB2. His background includes design and implementation of business solutions on client/server, Web, and enterprise platforms. Stephen is a published writer in both technical and non-technical endeavors. Stephen received an undergraduate degree in Computer Science and Physics from Florida State University.

About Webucator

Webucator provides instructor-led training to students throughout the US and Canada. We have trained over 90,000 students from over 16,000 organizations on technologies such as Microsoft ASP.NET, Microsoft Office, Azure, Windows, Java, Adobe, Python, SQL, JavaScript, Angular and much more. Check out our complete course catalog.