Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.sql.*;
- import java.io.*;
- public class poholski {
- public static void main(String[] argv) throws SQLException {
- Statement sql_stmt = null;
- Connection conn = null;
- try {
- Class.forName("COM.ibm.db2.jdbc.net.DB2Driver");
- conn = DriverManager.getConnection("jdbc:db2://141.83.150.70:8088/dbs", "db2inst1", "db2-prak");
- sql_stmt = conn.createStatement();
- } catch( Exception e) {
- System.err.println(e);
- System.exit(-1);
- }
- sql_stmt.execute("drop table flug;");
- sql_stmt.execute("create table flug ( flugnummer int not null, ursprung varchar(30) not null, ziel varchar(30) not null, distanz int not null, abflugzeit time not null, ankunftzeit time not null, primary key (flugnummer)");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement