Contact Information

Global Publishing Network, Inc.
P. O. Box 31471
Palm Beach Gardens, FL 33420

Phone: 561-625-6300
Fax: 561-626-9640

Database: What is a Query is and how is it used?

Queries are used to select data from a number of different tables and display them in a meaningful and informative way. The same as tables, queries aren’t seen by the user, who sees the meaningful things that the queries produce, for example, a telephone list sorted in alphabetical order of the companies and showing the contacts at each company as a sub-set of the company, or an input form enabling the user to enter details of new companies and contacts or new contacts at companies already in the database.

As for how queries are used, the simplest is to use a "Select" query, which, as the name implies, selects data from whichever source or sources you want. So you could select an item from a stock table, a customer from a customers table, a sales person from a staff table and date from a sales table to give the information needed for an invoice.

There are also "Append" queries, which take information from one table and add it to another, "Make" Table queries which create new tables from the information in others and "Delete" Queries which delete existing tables, among others.

The easiest way to create queries is by using a wizard, although the design window is more flexible. Some types of queries can only be written directly in SQL (Structured Query Language).