当前位置:网站首页>JDBC several pits
JDBC several pits
2022-06-12 17:34:00 【Integral mean value theorem】
pit 1. Guide pack
If MySQL Version of 5.0.x, Then the guide package must guide 5.0 My bag
yes 8.0.x Direct 8.0 My bag
Otherwise, an error will be reported during operation .
I don't know what version I am ?
cmd after , Enter your own mysql

pit 2—— function
// If MySQL yes 5.0 edition , There is no middle cj
Class.forName("com.mysql.cj.jdbc.Driver");
// If it is 5.0, You don't have to add it ?serverTimezone=GMT;
// Otherwise, it must be added , Otherwise an error
Connection connection = DriverManager.getConnection(
"jdbc:mysql://localhost:3306/gyp2021?serverTimezone=GMT", "root", "******");
Statement statement = connection.createStatement();
// This statement depends on the specific situation
String sql = "update account set balance=100 where id=1";
int i = statement.executeUpdate(sql);
System.out.println(i);
边栏推荐
- Atlassian Confluence 远程代码执行漏洞(CVE-2022-26134)漏洞复现
- Cesium抛物线方程
- Microsoft Office MSDT代码执行漏洞(CVE-2022-30190)漏洞复现
- Figma from getting started to giving up
- I heard that distributed IDS cannot be incremented globally?
- 写技术博客的意义
- ssm常用到的依赖
- [BSP video tutorial] stm32h7 video tutorial Issue 8: the last issue of the MDK theme, the new generation of debugging technologies event recorder and RTT, and using stm32cubemx to generate project tem
- 全局锁、表锁、行锁
- Arm64棧回溯
猜你喜欢

Tensorflow prompts typeerror: unsupported operand type (s) for *: 'float' and 'nonetype‘

5、Embedding

邱盛昌:OPPO商业化数据体系建设实战

selenium元素定位

Arm64 Stack backtrack

Microsoft Office MSDT代码执行漏洞(CVE-2022-30190)漏洞复现

MySQL transaction introduction and transaction isolation level

Atlas conflict Remote Code Execution Vulnerability (cve-2022-26134) vulnerability recurrence

内核中断整体流程图

淘宝Native研发模式的演进与思考 | DX研发模式
随机推荐
The R language uses the PDF function to save the visual image results to the PDF file, uses the PDF function to open the image device, uses the dev.off function to close the image device, and customiz
Add static route
Kill program errors in the cradle with spotbugs
Yyds dry goods inventory leetcode question set 911 - 920
qemu+gdb小节
Atlassian Confluence 远程代码执行漏洞(CVE-2022-26134)漏洞复现
R语言计算data.table在一个分组变量的值固定的情况下另外一个分组变量下指定数值变量的均值
MySQL transaction introduction and transaction isolation level
SqlServer常用语句及函数
Some introduction to FPC flexible circuit board design
R语言使用epiDisplay包的tableStack函数基于分组变量生成统计分析表(包含描述性统计分析、假设检验、不同数据使用不同的统计量和假设检验方法)、自定义配置是否显示统计检验内容
Evolution and thinking of Taobao native R & D mode | DX R & D mode
Installation and use of rolabelimg
价值超高的CA证书解析
C#操作数据库增查业务数据值内容案例学校表
Hangzhou AI developer meetup registration opens!
406. reconstruct the queue based on height
写技术博客的意义
How to view, modify, and delete SSH
卖疯了的临期产品:超低价、大混战与新希望