Home » Tag Archives: SQL (page 3)

Tag Archives: SQL

Implementing Client-Side Row-Level Security with jOOQ


Some time ago, we’ve promised to follow up on our Constraints on Views article with a sequel showing how to implement client-side row-level security with jOOQ. What is row-level security? Some databases like Oracle or the upcoming PostgreSQL 9.5 provide native support for row-level security, which is awesome – but not every database has this feature. Row level security essentially ...

Read More »

What Exactly are SQL Views?


You probably know about “ordinary views” already, but I’m sure you’ll find one or two things in this article that you haven’t thought about in this way yet… What exactly are SQL views? Views in SQL are a means of treating complex queries in the same way as “ordinary” tables. In fact, SQL is all about tables (which are bags ...

Read More »

Do Not Make This Mistake When Developing an SPI


Most of your code is private, internal, proprietary, and will never be exposed to public. If that’s the case, you can relax – you can refactor all of your mistakes, including those that incur breaking API changes. If you’re maintining public API, however, that’s not the case. If you’re maintaining public SPI (Service Provider Interfaces), then things get even worse. ...

Read More »

How to use SQL PIVOT to Compare Two Tables in Your Database


This can happen ever so easily. You adapt a table by adding a new column:                     ALTER TABLE payments ADD code NUMBER(3); You go on, implementing your business logic – absolutely no problem. But then, later on (perhaps in production), some batch job fails because it makes some strong assumptions about ...

Read More »

How to Extract a Date Part in SQL


The Modern SQL Twitter account (by Markus Winand) published a hint about how to extract a date part in SQL:                     The right way to get a part of a date/time is: EXTRACT(YEAR FROM CURRENT_DATE) = 2015 http://t.co/UNLyUoQdVb Retweet to spread the word! — Modern SQL (@ModernSQL) February 24, 2015 Is it true? Yes ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.