CODE
import java.sql.*;
class Database
{
public static void main(String args[])throws
Exception
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:nitin");
Statement st=con.createStatement();
ResultSet res=st.executeQuery("select * from Student");
while(res.next())
{
System.out.println(res.getInt(1)+" "+res.getString(2)+" "+res.getString(3)+" "+res.getString(4));
}
}
}OUTPUT DISPLAY
+ comments + 1 comments
I have read your blog its very attractive and impressive. I like it your blog.
Java Online Training Java EE Online Training Java EE Online Training Java 8 online training Core Java 8 online training
Java Online Training from India Java Online Training from India Core Java Training Online Core Java Training Online Java Training InstitutesJava Training InstitutesI have read your blog its very attractive and impressive. I like it your blog.
Java Online Training Java EE Online Training Java EE Online Training Java 8 online training Core Java 8 online training
Java Online Training from India Java Online Training from India Core Java Training Online Core Java Training Online Java Training InstitutesJava Training Institutes
Post a Comment