随笔分类 - 数据库
摘要:JDBC // JDBC连接mysql的一般步骤 // 1. 注册驱动 Class.forName("com.mysql.cj.jdbc.Driver"); // 2. 获取连接 String url = "jdbc:mysql://127.0.0.1:3306/db1"; // 连接mysql下的
阅读全文
摘要:MySQL常用操作 登录 mysql -uroot -p密码 DDL 查询 show databases; # 查询目前有哪几个数据库 show tables; # 查询当前数据库中有哪些表 desc tablename; # 查询某张表的结构 describe table 创建 create DA
阅读全文
摘要:Java如何像C++一样删除对象 You should remove the references to it by assigning null or leaving the block where it was declared. After that, it will be automatic
阅读全文
摘要:JDBC 数据库连接与使用 //连接Mysql数据库 import java.sql.*; import java.util.Scanner; public class sqlsearch { static final String JDBC_DRIVER = "com.mysql.jdbc.Dri
阅读全文

浙公网安备 33010602011771号