IntelliJ Save To Database with a Prepared Statement

Published: 12 October 2019
on channel: Prof. Vanselow
1,075
7

final String sql = "INSERT INTO Bike (Make, Handlebars, Frame, Tyres, SeatType, NumGears) VALUES (?, ?, ?, ?, ?, ?)";
PreparedStatement ps = conn.prepareStatement(sql);
ps.setString(1, make);
ps.setString(2, handlebars);
ps.setString(3, frame);
ps.setString(4, tyres);
ps.setString(5, seatType);
ps.setInt(6, numGears);

ps.executeUpdate();

https://docs.oracle.com/javase/tutori...
http://tutorials.jenkov.com/jdbc/prep...


Watch video IntelliJ Save To Database with a Prepared Statement online without registration, duration hours minute second in high quality. This video was added by user Prof. Vanselow 12 October 2019, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,07 once and liked it people.