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 articleCategory 3 posts
Writing about Database.
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 articleNOT 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 articleIn 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