Share this Page URL

Chapter 6. Sorting, Filtering, and Retri... > Designing Select Queries - Pg. 220

Sorting, Filtering, and Retrieving Data 220 Read through the SQL statements to get a sense of what they mean. The SELECT statement, for example, tells you that this query is a select query. This statement lists the fields in the query (including the table they come from), and the FROM clause identifies the source of the data. INNER JOIN describes the relationship between the MarketingCampaigns and CampaignExpenses tables, identifying the fields used to join the tables. (We'll also go into more detail about join types in Chapter 9.) You'll need to know the basics of SQL if you intend to work with queries and recordsets in Visual Basic. For example, to create a query in Visual Basic, you use a set of SQL expressions such as the one shown above to select the fields to include in the query and to define the selection criteria. We'll show an example of how to