Java基础进阶案例教程(课件)例9-3.docxVIP

  • 17
  • 0
  • 约1.22千字
  • 约 3页
  • 2018-12-28 发布于江西
  • 举报
程序代码如下。 import java.sql.*; public class Example9_3 { public static void main(String[] args) throws Exception{ String user=root; String password=1234; String url=jdbc:mysql://localhost:3306/xsgl; Class.forName(com.mysql.jdbc.Driver); Connection conn=DriverManager.getConnection(url, user, password); Statement stmt=conn.createStatement(); String sql_create=create table T(word varchar(20)); String sql_insert=insert into T values(hello); String sql_drop=drop table T; String []sql={insert into Test values(world), update T set word=hi where word=hello,select * from Tes

文档评论(0)

1亿VIP精品文档

相关文档