摘要:
1、ClassNoFoundException 找不到注册驱动可能原因:1>驱动名称不对 2>没有导入数据库驱动包2、SQl 语句中可以使用任何有效的函数,函数操作的列,必须指定别名,否则会出现java.sql.SQLException: 列名无效3、java.sql.SQLException: 无效的列索引: sql串里面?号的数目和提供的变量数目不一致4、java.sql.SQLException: 结果集已耗尽操作结果集的时候结果集的指针指向了结果集之外 例如:rs.beforeFirst();5、出现SQLException 的时候,通过System.out.println 阅读全文
摘要:
数据库1.创建数据库时启动mysql使用参数(运行->cmd)(mysql -u root -p --default-character-set utf8)mysql -uroot;2.创建数据库create database xxx default character set utf8;use xxx;set names utf8;修改数据库编码显示数据库编码(show variables like 'character%';)执行sql脚本source /home/tarena/phone.sql3.修改mysql 数据库连接urljdbc:mysql://local 阅读全文