Recent Posts
- NCC Punjab LDC Results 2013 NCCPunjab.com Interview Selected Candidates List
- RGUHS PGSSET Super Speciality 2013 Exam www.logisys.net.in Online Application
- RKCL RS-CIT Results 2013 rkcl.in RSCIT Final Exam May Result 2013
- TNEB Electricity Bills Online Payment tnebnet.org/awp/login Tamilnadu EB Payment System
- Kerala LET 2013 Fee Structure for 2013-14 Engineering College Admission
Discussion Forum
Create Table in Java DB JDBC Concepts
Create Table in Java DB JDBC Concepts. This Java Create Table DB (database) example describes the basic operations performed on the JDBC create table database connectivity code.In this example you will learn about how to write java code create database table with oracle database.
Create Table in Java DB JDBC Concepts. This Java Create Table DB (database) example describes the basic operations performed on the JDBC create table database connectivity code.In this example you will learn about how to write java code create database table with oracle database.
Program:
import java.sql.*;
public class CreateTable {
public static void main(String args[]){
Connection con=null;
Statement st = null;
try {
Class.forName(“oracle.jdbc.driver.OracleDriver”);
con=DriverManager.getConnection(“jdbc:oracle:thin:@localhost:1521:ORCL”,”scott”,”tiger”);
st = con.createStatement();
boolean c =st.execute(“create table eshusoft(username varchar2(20) ,password varchar2(20))”);
System.out.print(“Table eshusoft is created ”);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
Result:
Table eshusoft is created
