Chapter 16: Tackling Aliases and SQL Templating

This chapter covers two important topics that sustain your road to becoming a jOOQ power user: aliases and SQL templating.

The first part of this chapter tackles several practices for aliasing tables and columns via the jOOQ DSL. The goal of this part is to make you comfortable when you need to express your SQL aliases via jOOQ and to provide you with a comprehensive list of examples that cover the most common use cases.

The second part of this chapter is all about SQL templating or how to express SQL when the jOOQ DSL cannot help us. There will be rare cases when you'll have to write plain SQL or combine DSL and plain SQL to obtain some corner cases or vendor-specific features.

In this chapter, ...

Get jOOQ Masterclass 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.