Skip to content
Alessandro Lacava
  • Home
  • Blog
  • Articles
  • Talks

Category 3 posts

Database

Writing about Database.

Database4 Jun 2008

Performance differences between IN and EXISTS

I often hear people wondering whether the EXISTS or the IN operator is better. Let's start by saying that the two operators behave differently when NULL values are involved (see this post).…

Read article ↗
Database4 Jun 2008

NOT IN vs. NOT EXISTS when NULL values are involved

NOT IN does not behave as you would expect when NULL values are involved. Suppose you have the following tables: CDFIELD DSFIELD 1 ALPHA 2 BETA TABLEA CDFIELD DSFIELD 1 GAMMA NULL DELTA…

Read article ↗
Database12 Dec 2007

How to get the number of columns in a ResultSet in Java

In Java it is possible to retrieve the number of columns in a ResultSet dynamically, thanks to the ResultSetMetaData class. Here's an example: The previous code retrieves and displays the…

Read article ↗
Alessandro Lacava

Software, words, and the ideas in between.

GitHub ↗LinkedIn ↗X / Twitter ↗Email ↗
© 2026 Alessandro Lacava
RSS feedPrivacy and cookies