2023-06-11
百宝箱

参考地址
https://www.bilibili.com/video/BV1bf4y1A7co/?vd_source=d476ccd7f594c6a924ede109727a1a64

播放mp4的视频,电脑提示”播放此视频需要新的编解码器HEVC”

1.打开https://store.rg-adguard.net/
2.搜索栏左边点开选择“ProductId” 输入代码9n4wgh0z6vhq 然后√
3.在页面下脚,选择..AppxBundle问价下载安装
注意:google浏览器无法下载,则换用其它浏览器下载

阅读更多

2023-04-02
sqlserver row_num()的用法

1
2
3
4
5
6
7
8
9
select row_number() over(order by 表名 desc) as RowNumber_ID,*from 
(
select t.name as '表名' ,i.name as '主键'
,s.avg_fragmentation_in_percent as '阈值' from sys.tables t
join sys.indexes i on i.object_id=t.object_id
join sys.dm_db_index_physical_stats(db_id(),object_id(0),null,null,'limited') s
on s.object_id=i.object_id and s.index_id=i.index_id
)
c
1
2
3
4
5
6
7
8
9
10

select row_number() over( partition by 阈值 order by 表名 desc) as RowNumber_ID,*from
(
select t.name as '表名' ,i.name as '主键'
,s.avg_fragmentation_in_percent as '阈值' from sys.tables t
join sys.indexes i on i.object_id=t.object_id
join sys.dm_db_index_physical_stats(db_id(),object_id(0),null,null,'limited') s
on s.object_id=i.object_id and s.index_id=i.index_id
)
c
阅读更多

2023-04-02
sqlserver with as的用法

/以下sql语法为优化前后,查看有何妙处*****/
–前

select n.c1, n.c2,n.c3,n.c4,n.c5 from
(
select count(t.c1), t.c1, t.c2,t.c3,t.c4,t.c5 from tab1 t
where t.c2 not in (‘val1’,’val2’,’val3’,’val4’,’val5’)
group by t.c1, t.c2,t.c3,t.c4,t.c5
) n
where 1=1
and n.c1 is not null
and not exists
(
select * from
(
select count(s.c2), s.c1, s.c2
from (
select m.c1, m.c2,m.c3,m.c4,m.c5 from tab1 m
where exists
(
select c1 from tab2 n
where c2 > sysdate - 14
and m.c1 = n.c1
)
and m.c1 is not null
and m.c2 not in (‘val1’,’val2’, ‘val3’, ‘val4’, ‘val5’)
) s
group by s.c1, s.c2
)
t1 where t1.c2 = n.c2
)

–后

with t1 as(
select count(t.c1), t.c1,t.c2,t.c3,t.c4,t.c5
from tab1 t
where t.c2 not in (‘val1’,’val2’,’val3’,’val4’,’val5’)
and c1 is not null
group by t.c1, t.c2,t.c3,t.c4,t.c5)

select t1.c1,t1.c2,t1.c3,t1.c4,t1.c5
from t1
where not exists(
select /+ use_hash(m,n)/ m.c1, m.c2,m.c3,m.c4,m.c5
from t1 m,tab2 n
where n.c2 > sysdate - 14
and m.c1 = n.c1
and t1.c2 = m.c2);

阅读更多

2023-04-02
sqlserver游标

@@fetch_status= 0 fetch语句执行成功
@@fetch_status=-1 fetch语句失败或行不在结果集中
@@fetch_status=-2 提取的行不存在
@@fetch_status=-9 光标未执行提取操作

@@error=0 表示执行出错

阅读更多

2023-04-02
sqlserver常用知识


SQL Server(MSSQLSERVER)启动出现 17058的错误,双击服务点击登录,选择本地系统账户即可

SQL Server(MSSQLSERVER)启动出现 17058的错误,双击服务点击登录,选择本地系统账户即可

阅读更多
浏览 |

© 2023 南疆 with help from Hexo and Twitter Bootstrap. Theme by Freemind.

container-narrow -->