• 20165339第7周学习总结


    第七周学习总结

    教材学习内容总结

    第十一章

    • MySQL数据库
    • 建立链接
    • 建立数据库
    • 创建表
    • 数据库的功能:数据的存储、查询、修改、安全
    • JDBC-MySQL
    • 加载JDBC-MySQL数据库驱动
    try{ Class.forName("com.mysql.jdbc.Driver");
    }
    catch(Exception e){}
    
    • 查询
    • 如果数据库的表中的记录有汉字,那么在建立连接时需要额外多传递一个参数characterEncoding,并取值gb2312或utf-8
    String uri = "jdbc:mysql://localhost/students?useSSL=true&characterEncoding=utf-8"; con = DriverManager.getConnection(uri, "root","");
    
    • 更新、添加与删除操作
    • 更新update 表 set 字段 = 新值 where<条件子句>
    • 添加insert into 表(字段列表)value (对应的具体的记录)
    • 删除delete from 表名 where <条件子句>

    代码托管

  • 相关阅读:
    Choosing the Type at Runtime
    User-Defined Components Must Be Capitalized
    Computed property names
    Controlled Components
    Handling Event
    State
    props
    Functional and Class Components
    招聘漂亮的员工
    Spread Syntax
  • 原文地址:https://www.cnblogs.com/tytiswd/p/8849252.html
Copyright © 2020-2023  润新知