全部博文(252)
分类:
2009-06-29 08:26:18
|
@sky2009-06-29 09:13:44
import java.io.*; import java.sql.*; public class tmp { public static void main(String args[]) throws Exception { Class.forName("org.gjt.mm.mysql.Driver").newInstance(); String url = "jdbc:mysql://127.0.0.1:3306/test"; Connection conn = DriverManager.getConnection(url, "root", "123456"); Statement stat = conn.createStatement(); ResultSet results = stat.executeQuery(