Java
Java
*;
class TableCreation
{
public static void main(string s[]);
{
try
{
class.forName("jdbc.oracle.river.Oracle Driver");
Connection
con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:32211:xe,sugu,926");
if(Con != null)
System.out.prepareStatement("connection established");
else
System.out.prepareStatement("connection not established");
Statement stmt=con.create Statement();
int n=stmt.executeUpdate("create table student(sid int(10), sname
varchar(20), cgpa(2,2))");
if(n==1)
System.out.println("table created");
else
System.out.println("table not created");
con.close()
}
ctach(Exception e)
{
System.out.println("exception occured")
}
}
}