In JDBC, why do parameter indexes for prepared statements begin at 1 instead of 0?

后端 未结 6 1672
暗喜
暗喜 2020-12-08 19:04

Everywhere else in Java, anything with an index starts at 0. Is there a reason for the change here or is this just bad design?

6条回答
  •  不思量自难忘°
    2020-12-08 19:55

    More human friendly maybe? Also, Java's regular expression Matcher's group starts with 1 as the first matched group.

提交回复
热议问题