1. 下載JDBC-MySQL數據庫驅動java
2. 加載JDBC-MySQL數據庫驅動git
3. 鏈接數據庫sql
1. where子語句:
select 字段 from 表名 where 條件
更新、添加與刪除操做:Statement對象調用方法:
public int executeUpdate(String sqlStatement);數據庫
2. 更新:
update 表 set 字段 = 新值 where <條件語句>學習
3. 添加:
insert into 表(字段列表)values (對應的具體的記錄)或 insert into 表 values(對應的具體的記錄)對象
4. 刪除:
delete from 表名 where <條件子句>blog
使用通配符 P339排序
通用查詢 P340事務
事務get
鏈接SQL Server、Derby數據庫 P345-347
代碼提交的過程: