Query
A query is a request for information or an action sent to a database or search engine. It is written in a specific language that the computer system can understand and process.
Database queries. This is the most common use of the term in computing. A database query can retrieve, manipulate, or calculate data.
How it works. A user writes a command using a query language, such as Structured Query Language (SQL). The database management system (DBMS) receives and interprets the request. The system scans the database tables and performs the action. The results are returned in a human-readable format, such as a new table, a graph, or an image.
Common query types
Select query: Retrieves specific data from one or more database tables. The SELECT command in SQL is the most common type.
Action query: Modifies data in the database. Types include:
Insert: Adds new rows or records to a table.
Update: Changes existing records in a table.
Delete: Removes one or more records from a table.
Parameter query: Prompts the user for specific input each time it is run, making it more dynamic.
Crosstab query: Displays summarized values, such as sums or averages, in a matrix-like format.