A First Look at Queries

Texis uses a query language that gives users access to data stored in a relational database. The data manipulation component of this language enables a user to:

  • Write queries to retrieve information from the database.

  • Modify existing data in the database.

  • Add new data to the database.

  • Delete data from the database.

In this and the next two chapters, we will review the query capabilities of Texis. In Chapter here, we will study the update, insert, and delete features of the language.

After the tables have been created and loaded with data, you can answer requests for information from a database without the help of professional programmers. You write a question, also called a query, that consists of a single statement explaining what the user wants to accomplish. Based on this query, the computer retrieves the results and displays them. In this chapter you will study some of the simpler ways to form queries.

In Texis, you retrieve data from tables using the SELECT statement, which consists of one or more SELECT-\verbFROM"-WHERE blocks. The structure of this statement, in its simplest form, consists of one block containing three clauses: SELECT, FROM, and WHERE. The form of this statement follows:

SELECT  column-name1 [, column-name2] ...
     FROM    table-name
     [WHERE  search-condition] ;
Syntax Notes:

  • The "..." above indicates additional column names can be added.

  • Brackets `[ ]' surrounding a clause means the clause is optional.


Copyright © Thunderstone Software     Last updated: Apr 15 2024
Copyright © 2024 Thunderstone Software LLC. All rights reserved.