import java.sql.*;
import java.io.*;

public class createKAHVE{
        public static void main(String args[]) throws IOException
        { 

              String url = "jdbc:odbc:prog";
                Connection con;
                String createString;
                createString = "create table KAHVE " +
                "(KAHVE_ISMI varchar(32), " +
                  "NUMARA int, " +
                  "FIYAT float, " +
                  "SATIS int, " +
                  "TOPLAM int)";
  Statement stmt; 
  try {
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
        } catch(java.lang.ClassNotFoundException e) {
   System.err.print("ClassNotFoundException: "); 
   System.err.println(e.getMessage());
  }
  try {
                        con = DriverManager.getConnection(url,"Login", "Password"); 
                        stmt = con.createStatement(); 
                        stmt.executeUpdate(createString); 
   stmt.close();
   con.close(); 
                    } catch(SQLException ex)
                {System.err.println("SQLException: " + ex.getMessage());}
 }
}

