Statement interface executeUpdate() in JDBC | JDBC Online Training

This  JDBC Online Training “Statement interface executeUpdate() in JDBC” explains clearly how to work with execute Update() method in Statement interface in JDBC application development.


 

int executeUpdate(String SQL) :

  • Used to execute DML commands like insert, update and delete commands in Database.
  • Returns int value that represents number of rows affected by the execution of the SQL statement.

 

Create table in the database :

create table onlinestudent(sno number , sname varchar2(20) , sfee number);

 

Insert data into table :

  1. SQL> insert into onlinestudent values(101 , ‘Raam’ , 5000);
  2. SQL> insert into onlinestudent values(102 , ‘Robert’ , 4000);
  3. SQL> insert into onlinestudent values(103 , ‘Rahim’ , 6000);

 

 

 

 

Share this