What does it mean when I say Prepared statement is pre-compiled?

前端 未结 3 403
春和景丽
春和景丽 2020-12-15 07:46

I am using MySQL in Java. I don\'t have a good understanding of PreparedStatement.
I know it is better to use PreparedStatem

3条回答
  •  醉梦人生
    2020-12-15 08:41

    It is already translated into code the database server understands. Only placeholders are left for the variables you are inserting.

    For example a Java program also has to be compiled from source code to byte-code, where the soruce code is the human readable for of the program and the bytecode is the representation if the source code which is also understood by the machine

提交回复
热议问题