This article describes how to query data from the DB2 data table and view. If you encounter similar operations, however, if you do not know how to perform proper operations on the DB2 data table and View query data, the following articles must be a mentor to you.
After the data is inserted into the DB2 data table, you can use the SELECT statement or execute the Query operation in the Control Center to Query it. By providing predicates in SELECT statements, you can retrieve only useful or related information for them. In the previous loading exercise, you have seen an example of using Command Editor to execute the SELECT statement. The next exercise demonstrates another way to query data.
View the table content. Select the HWLD. AUTHOR table and click Open.
Figure 37 shows all data except XML column data. To view XML data, click... Button.
Figure 37. View table
The following window should be opened:
Figure 38. View XML data in the table
Click the Expand All button to view the complete structure of the XML document.
You can also query views. Use the simple view HWLD. DB2_AUTHOR. Click Control Center> View and select DB2_AUTHOR. Click Query.
Command Editor is started, which contains the appropriate SELECT statement for querying DB2_AUTHOR.
Click the green execution button in Command Editor. The Query Results panel is displayed. The result of the HWLD. DB2_AUTHOR view is displayed:
Figure 39. query view
The above content is an introduction to querying data from the DB2 data table and view.