How Do I Access a Database? [ Up and Running with ALLBASE/SQL ] MPE/iX 5.0 Documentation
Up and Running with ALLBASE/SQL
How Do I Access a Database?
You use the SQL CONNECT command to establish a connection to the
DBEnvironment. You can then access a particular database as follows:
* Through ISQL.
* Through application programs you create yourself.
During database access, you perform queries or other operations that
manipulate data by inserting, deleting, or modifying rows in tables.
This process is called data manipulation.
Queries and Other Data Manipulation
Data manipulation commands access the data in databases. An example is a
query using the SQL SELECT command, which displays a selection of data
from database tables. Here is a simple query for information from the
Employees table. The asterisk means all rows and columns:
SELECT * FROM Employees;
Below is the query result:
select * from employees;
--------------+-----------+-----------
LASTNAME |FIRSTNAME |EMPNUMBER
--------------+-----------+-----------
Harrison |Gerald | 2432099
Abelson |Annette | 3510044
Stanley |Peter | 3540011
Walters |Georgia | 9124772
The query result is also known as a result table.
Other data manipulation commands include the SQL INSERT, UPDATE, and
DELETE commands. These let you add rows to a table, update specific
column values in existing rows, or delete rows. Many examples of data
manipulation are shown in later chapters.
MPE/iX 5.0 Documentation