Difference between Java sql.Statement and java. sql. PreparedStatement

Published: 06 March 2022
on channel: infotec t
195
4

Java sql.Statement ----
String s1= "select * from EMPLOYEE where id = ";
int i1 = 2 ;
stmt.executeQuery(s1+String.valueOf(i1));
means-- select * from EMPLOYEE where id = 2;
java. sql. PreparedStatement ---
prepStmt = con.prepareStatement("select * from EMPLOYEE where ID=? ");
prepStmt.setInt(1, 8);
means --- select * from EMPLOYEE where ID=1;
select * from EMPLOYEE where ID=8;


On this page of the site you can watch the video online Difference between Java sql.Statement and java. sql. PreparedStatement with a duration of hours minute second in good quality, which was uploaded by the user infotec t 06 March 2022, share the link with friends and acquaintances, this video has already been watched 195 times on youtube and it was liked by 4 viewers. Enjoy your viewing!