9.8. Summary

This chapter shows the power of SQL statements to manipulate the database data, including the SELECT, INSERT, UPDATE, and DELETE statements. In the SQL statements, you can use the DB2 special registers to obtain information about the environment such as the current date and current user connected to the database.

Besides the basic SQL statements to manipulate data, you can also use column and scalar functions, cast expressions, WHERE clauses, ORDER BY clauses, GROUP BY clauses, FETCH FIRST n ROWS ONLY options, and many other features to customize the result that you want to obtain.

It is very common that data requested is from more than one table. Inner and outer joins are used to combine data from two or more tables in a SELECT ...

Get Understanding DB2®: Learning Visually with Examples now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.