Use the interactive SELECT statement to query data in a table. With this statement, you select columns from a table. See the DB2 Server for VSE & VM SQL Reference manual for details on how to use SELECT statements.
Note: | ISQL recognizes (by default) uppercase and lowercase letters as identical in commands. Also by default, all character data in a table is stored as uppercase. Your query on the row containing the word James, for example, selects the row containing JAMES in uppercase, even if you typed james in lowercase in your query. These case defaults can be changed using the SET CASE command, which is discussed in detail in Chapter 10, ISQL Commands. |
The displayed length attribute of VARCHAR columns is determined by the default VARCHAR length set in your profile. The system default length for VARCHAR columns is 20 characters. Only the first 20 characters are displayed. You can change the default length by using the SET command. Because the default length for VARCHAR columns can be different, you may see more or fewer characters on your display of VARCHAR columns than are shown in this manual.
You may have seen the following message on your display just before the query result:
ARI7960I The query cost estimate for this SELECT statement is 1.
The cost estimate value for this SELECT statement is also displayed in the last row of output at the end of the query result.
This information is useful for estimating the time needed to obtain query results. Larger cost-estimate values suggest that processing takes longer. The information is provided before the query result is displayed so that you can cancel the request if you think it will take too much time. The information is also provided after the query result is displayed, because the query result may have been displayed before you read message ARI7960I, or the message may have been suppressed. For additional information on the SET COSTEST command refer to Chapter 10, ISQL Commands.
The cost estimate value is not a unit of time such as seconds. The value becomes more useful as you enter more SELECT statements and become acquainted with the processing times for the cost estimate values.