Example : How to Delete/Remove data or single record from oracle 10g database.
// Write Java-Oracle 10g Connectivity Code here first properly/globally.
private void jBtnRegDeleteActionPerformed(java.awt.event.ActionEvent evt)
{
String UID = jTxtRegUname.getText().trim();
try
{
pst=conn.prepareStatement("delete from REGISTRATION where REGUNAME = '"+UID+"'");
pst.executeUpdate();
//out.println("Data Delete Succefully....");
showMessageDialog(null,"Data Delete Successfully....");
}
catch(Exception e)
{
System.out.println(e);
}
}
0 Comments