In JDBC, why do parameter indexes for prepared statements begin at 1 instead of 0?
Historically, databases have used 1-based indexing for bound parameters. This probably reflects the origins of relational databases in set theory and mathematics, which index elements starting with one, and use zero to represent a null or empty set. In shell scripts and regular expressions, the zero index usually means something “special”. For example, in the … Read more