Access 2007 Query Introduction

Source: Internet
Author: User
Tags crosstab

A query is a tool that Access2007 database processes and analyzes data and filters the information needed in the specified (one or more) tables for the user to view, change, and analyze using the given conditions.

The query is an important object of the ACCESS2007 database, which is a new data collection by the query filter to meet the criteria records. The table or query from which you get the data becomes the data source for the query. The results of a query can also be a data source for other objects in the database.

In a nutshell, a query has the following functions:

(1) View, search, and analyze data.

(2) Append, change and delete data.

(3) To achieve the filtering, sorting and calculation of records.

(4) As a data source for reports, forms, and data pages.

(5) Link the data obtained in one and more tables.

The category of the query.

In Access2007, according to the different operation result of the data source, the query can be divided into 5 kinds, which are select query, parameter query, cross query, operation query and SQL specific query.

1, select the query

Select a query is the most common, but also the most basic query. It gets the data from one or more tables and displays the results, based on the specified query criteria. You can also use a select query to group records and make totals, counts, averages, and other types of totals for records.

2. Parameter inquiry

A parameter query is an interactive query that uses a dialog box to prompt the user for a query condition, and then retrieves the record based on the criteria entered.

As a data source for forms, reports, and data access pages, you can easily display and print the information you need. For example, you can use a parameter query to create a report of a class's performance statistics. When you print a report, the Access2007 pop-up dialog box asks the class that the report needs to display. After the class is entered, Access2007 prints the results report for the class.

3. Cross-Table Query

You can use crosstab queries to compute and rearrange the structure of your data, which makes it easier to analyze data. A crosstab query can calculate statistics, averages, counts, or other types of totals for a data.

4. Operation Inquiry

An action query is a query that changes or moves many records in one operation. There are 4 types of action queries: Delete, update, append, and build tables.

1 Delete query: Delete Query can delete a set of records from one or more tables.

2 Update query: An update query can make a comprehensive change to a set of records in one or more tables. For example, you can increase the base salary of all teachers by 10%. With an update query, you can change the data in an existing table.

3 append query: An append query can append a set of records from one or more tables to the end of one or more tables.

4 Making Table query: Make-table queries create new tables from all or part of the data in one or more tables. For example, in teaching management, make-table queries are used to generate failed student tables.

5. SQL specific Query

SQL (Structured Query language) queries are queries created using SQL statements.

There are certain SQL queries that cannot be created using query Design view, but must be created using SQL statements. There are 3 types of queries such as pass-through queries, data-definition queries, and federated queries.

Original: http://www.officeba.com.cn/article/htmldata/detail/2007/11/8/1485.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.