import java.sql.*;
class UpdateRecord
{
public static void main(String[] args) throws Exception
{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","system","system");
Statement stmt=con.createStatement();
int a=stmt.executeUpdate("update emp3 where name='rahul'");
System.out.println("no of rows are Updated:------->"+a);
}
}
No comments:
Post a Comment