之前項目中就遇到查詢所有部門層級的需求,當時MySQL用的5.7的版本,然后我是自定義了一個函數(shù)實現(xiàn)了,當然,函數(shù)里面實際也是遞歸查詢。
2021-01-29
MySQL 8.0增加了好多功能,發(fā)現(xiàn)了老師的一個SQL專欄:https://gitbook.cn/gitchat/column/5dae96ec669f843a1a4aed95
2020-02-08
<img src=x onerror=alert("1&2+'a'")>
2020-01-19
with recursive fb_list(n1, n2) as
(
select 0, 1
union all
select n2, n1+n2 from fb_list where n1 + n2 <=100
)
select 0
union all
select n2 from fb_list;
(
select 0, 1
union all
select n2, n1+n2 from fb_list where n1 + n2 <=100
)
select 0
union all
select n2 from fb_list;
2019-11-05