Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. import java.sql.*;
  2. import java.io.*;
  3.  
  4. public class poholski {
  5. public static void main(String[] argv) throws SQLException {
  6. Statement sql_stmt = null;
  7. Connection conn = null;
  8. try {
  9. Class.forName("COM.ibm.db2.jdbc.net.DB2Driver");
  10. conn = DriverManager.getConnection("jdbc:db2://141.83.150.70:8088/dbs", "db2inst1", "db2-prak");
  11. sql_stmt = conn.createStatement();
  12. } catch( Exception e) {
  13. System.err.println(e);
  14. System.exit(-1);
  15. }
  16. sql_stmt.execute("drop table flug;");
  17. 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)");
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement