O'Reilly logo

SQL for eServer i5 and iSeries by Kevin Forsythe

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Advanced SQL Examples

In this chapter, we focus on using more complex SQL statements. Now that you’ve learned the basic mechanics of how to use SQL on the iSeries, either through the interactive tools or by embedding it within high-level language programs, the next step is to begin to expand your repertoire of techniques. This chapter examines a variety of increasingly sophisticated SQL statements to illustrate some of the more complex things you can do with SQL. We review joins, unions, aliases, sub-SELECTs, and transaction processing.

Joins

The basic SELECT statement displays one or more columns from a single file. When columns must be merged from two or more files, a JOIN should be used. There are two different ways to accomplish this. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required