In that tutorial, the final SQL statement was "SELECT People.FirstName, People.LastName, People.Age, People.State FROM People;"
In this tutorial I will go into further detail about what that means and how you can write your own SQL Select statements like that one to show exactly the data you want. The advantage of using a SELECT in Access as opposed to the wizard from the previous tutorial is the SQL provides more flexibility and you are able to show exactly the data you want and are not limited to the options presented to you in the GUI wizard. This is just a basic overview of the simple SELECT Access query you can make.
What if you want to show all the fields and all the rows that exist in the table? This is the first query a beginner will learn, and should learn.
In the above query, there are four fields written between the word SELECT and FROM. Those four fields are the only ones going to be shown. However, what if we want to see all the fields in the table and don't know how many fields the table has? Then you can use the wildcard asterisk "*" to specify to Access that the SELECT Access query wants to show all the fields. An example using the above table would be:
SELECT * FROM People;
That will simply show all the fields and all the rows in the table called People.
Notice that the only difference between our new SELECT Access query and the previous one is that the text "People.FirstName, People.LastName, People.Age, People.State" has been replaced by the text "*". Both SELECT queries show you the same data.
You might be wondering why the Access wizard generated the much longer query and not the SELECT Access query that uses the asterisk. The reason is when you went through the wizard, you got to select which fields you wanted to show using the SELECT Access query.
Microsoft Access doesn't know how many fields you will select. If you had selected just one field for example ("People.FirstName"), then the query would be "SELECT People.FirstName FROM People;" This is the SELECT statement that Access would generate, and it would be correct. We cannot use the asterisk if we want to show just one field because the asterisk shows all of them.
Because of this, a SELECT Access query created by the Microsoft Access Query Wizard will put in the names of the individual fields even if you select all the available fields in the Access table.
Published by Kantus
I love writing short stories and humor articles, but tend to stick with topics that are discoverable by search engines and capable of spreading virally. View profile
Microsoft Access Tutorial - Primary Key and IDsA tutorial showing how to create a primary key and id columns for your Microsoft Access tables.- Microsoft Access Tutorial - Quickest Way to Make a ReportThis tutorial goes through the AutoReport functionality of Microsoft Access to show you how to quickly create a report.
Microsoft Access Tutorial: How to Modify Datasheet Layout OptionsA tutorial showing how colors, fonts, and other various effects and layout options for a Microsoft Access datasheet can be customized.
Microsoft Access Tutorial: How to Password Protect Your DatabaseA tutorial that shows how to create and remove a password for a Microsoft Access database.- Microsoft Access Tutorial - How to Create Documentation for TablesA tutorial that shows you how to use the Documenter wizard in Microsoft Access to create documentation for your database tables.
- Microsoft Access Tutorial - How to Create a Report in Microsoft Access
- Mastering Microsoft Access - Creating Great Useful Databases - Lesson 1
- Microsoft Access Tutorial - 4 Steps to Creating a Database
- Microsoft Access Tutorial - How to Create a Chart of Data
- Microsoft Access Tutorial - 5 Steps to Creating a Database Table
- How to Execute a Basic WHERE Clause SQL Query In Microsoft Access
- Microsoft Access Tutorial - Convert Database to Different Version of Access

