不仅是把switch语句的范围扩展到字符串上,而且要扩展到其他类型上,这已经是多年来一直反复在提交的一个增强性请求了。
Extending the reach of the switch statement, not only to strings but also to other types, has been the subject of repeated enhancement requests over the years.
准备好的语句可重新编译,从而获得更好的性能,在您反复执行同一操作时,它非常方便。
Prepared statements are recompiled for better performance and are convenient when you need to do the same thing over and over again.
相反,如果要反复执行多次一条简单的语句,并且每次使用不同的值执行,建议使用 PreparedStatement,因为语句只需编译一次。
The opposite is true: PreparedStatement is recommended when a simple statement is executed many times with different values because the statement has to be compiled only once.
应用推荐