import java.sql.*;
class jdbcjianlibiao{
public static void main (String args[]){
try{
	Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
	}catch(ClassNotFoundException ce){
		System.out.println("SQLException:"+ce.getMessage());
		}
try{
	Connection conn=
	DriverManager.getConnection("jdbc:odbc:mylibDB");
	Statement stmt=conn.createStatement();
	//ıṹ
	//stmt.executeUpdate("delete table publishing");
	String sql="create table publishing(press char(40),num long)";
	stmt.executeUpdate(sql);
	//¼
	sql="insert into publishing (press,num)values('廪ѧ',120000000)";//
	stmt.executeUpdate(sql);
	sql="insert into publishing values('йˮˮ',110000000)";
	stmt.executeUpdate(sql);
	//ʾѯ
	ResultSet rs=stmt.executeQuery("select * from publishing");
	
	while(rs.next()){
		 System.out.println(":"+rs.getString("press")+"\t"+
		  ":"+rs.getInt("num"));
		  }
		  rs.close();
		  stmt.close();
		  }catch(SQLException ce){
		  	 System.out.println("SQLException:"+ce.getMessage());
		  	 }
  	}
}
