Practwentyseven
Practwentyseven
import java.sql.*;
// Create table
String create = "CREATE TABLE student (id NUMBER(5), name
VARCHAR2(50))";
stmt.executeUpdate(create);
System.out.println("Table created!");
// Insert records
stmt.executeUpdate("INSERT INTO student VALUES (101,
'Asmita Doddamani')");
stmt.executeUpdate("INSERT INTO student VALUES (102,
'Vaishnavi')");
stmt.executeUpdate("INSERT INTO student VALUES (103,
'Krishvi')");
System.out.println("Records inserted!");
con.close();
} catch (Exception e) {
System.out.println(e);
}
}
}