Skip to content

Commit 27406a4

Browse files
authored
修改为markdown
1 parent 78a6488 commit 27406a4

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

MySQL note.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
1.总天数 select to_days('2015-1-18')
2+
2. date('') yMd
3+
3.当前时间与特定时间所差周数的实现
4+
declare i int;
5+
set i = timestampdiff(week,date(date_add(p_time,interval 8-dayofweek(p_time) day)),date(date_add(now(),interval 8-dayofweek(now()) day)));
6+
return if(i<0,abs(i),i+1) ;
7+
4.limit后只能跟常量
8+
5.count() 返回hibernate是BigInteger
9+
6.hibernate 返回值不add scale,直接返回Object[] 时,sql里不能设置别名 如select text.text as name
10+
7.insert into table(columns) values(...),(...) mysql批量插入、
11+
8.update table set 。。 where id=(select * from (select max(id) from table) as A);必须再次select下
12+
9.SET GLOBAL event_scheduler = ON; 或者在mysql.ini下添加event_scheduler=1
13+
10.update可以用order by limit 1
14+
11.alter table users AUTO_INCREMENT=123456
15+
12.cursor 一定要在not found 时设置标记 然后leave loop。否则死循环!!!!2货

MySQL note.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)