20165321 第七周作业

教材学习内容总结

  • MySqL:是世界上最流行的开源数据管理系统。
  • 配置启动MySQL。
    连接数据库:Connection getConnection(java.lang.String,java.lang.String,java.lang.String) 和Connection getConnection(java.lang.String)。
    SQL查询语句:try{ Statement sql=con.createStatement();
    }
    catch(SQLException e ){}
  • 顺序查询:使用next()方法移动到下一个数据行。
  • 控制游标:使用Statement stmt = con.createStatement(int type ,int concurrency)。
  • 条件与排序查询:where子语句、用order by 子语句对记录进行排序。
  • 更新:update 表 set 字段 = 新值 where<条件子句>
  • 添加:insert into 表(字段列表)value (对应的具体的记录)
    或insert into 表 values (对应的具体的记录)
  • 删除:delete from 表名 where <条件子句>

运行截图

Intellj IDEA 简易教程数据库书签中的程序运行结果及xampp的打开情况:


原文地址:https://www.cnblogs.com/xpl20165321/p/8849576.html