数据库技术
原文转自:http://blog.csdn.net/chengyuqiang/article/details/54285857 1、程序报错: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link 2 ...
纯粹记录一下最基础写法,几乎没有写什么逻辑,写法也并不是很完善(因为我自己也刚刚摸索出来这么写可以...= =!) 望高手指教 也希望能够帮到比我还新的新手.... //1.insert操作 let insertSql = 'insert into User(username,password,na ...
--查询数据库是否存在 if exists ( select * from sysdatabases where [name]='TestDB') print 'Yes, the DB exists' else print 'No, need a new one?' --新建一个数据库 create ...
连接池 1)传统方式找DriverManager要连接。数目是有限的。 2)传统方式的close()。并没有将Connection重用。仅仅是切断应用程序和数据库的桥梁,即无发送到SQL命令到数据库端运行 3)项目中,对于Connection不说,不会直接使用DriverManager取得,而使用连 ...
explain select * from film where rating>9\G; possible_keys 从左到右,性能由最差到最好 ALL:全表扫描 index:索引全扫描 range: 索引的范围扫描 用于<,<=,>,>=,between等操作 ref:使用非唯一索引扫描或者唯一索 ...
1. 授予行迁移权限 alter table table_name enable row movement; 2. 到15分钟前: flashback table order to timestamp systimestamp - interval '15' minute; 到某个时间点: FLAS ...
查询 每个学生 的 (姓名,语文,数学,英语,成绩)为列 表结构如下: student: 学生表 grade 成绩表 : 查询出如下效果: SQL如下: ...
网站搬家,mysql版本由5.6升级到5.7,遇到问题: mysql 5.7之后版本datetime默认值设置'0000-00-00',出现异常:Invalid default value for 'create_time' 查阅手册 mysql 5.7使用NO_ZERO_IN_DATE, NO_Z ...
需求:首先有一张表记录学生姓名、科目和成绩,然后模拟插入几条数据,脚本如下: 现在我们需要得到一个结果,能根据姓名分组显示每个学生所参考的科目数量和总分数,期望结果如下: 那么我们需要写入的sql脚本如下: 然后就能得到上面结果了,重点是:count(distinct subject) 科目,再一次 ...