Queries and reports

You can use SQL, the Open Query File (OPNQRYF) command, the Query (QQQQRY) API, Open Database Connectivity (ODBC), or the IBM Query for i licensed program to create and run queries.

One of the most common tasks that you perform with your database is to retrieve information. The system provides several methods to create and run queries and reports.

You can use an SQL statement to retrieve information. This SQL statement is called a query. The query searches the tables stored in your database to find the answer to the question that you posed with your SQL statement. The answer is expressed as a set of rows, which is referred to as the result set. After a query has been run, you can also create a report to display the data provided in your result set.

In addition to using SQL, you can use other functions and products to create and run queries and reports. See the following information for details.

In addition, you can build SELECT, INSERT, UPDATE, and DELETE SQL statements in the SQL Assist window of System i® Navigator.