03 2021 档案

SQL Server 【应用】行列转换Pivot&Unpivot
摘要:行转列 准备工作 create table #temp ( Name nvarchar(10) null, Course nvarchar(10) null, Score int null ) insert into #temp(Name,Course,Score) select '小李','语文' 阅读全文

posted @ 2021-03-16 23:49 杏村牧童 阅读(44) 评论(0) 推荐(0) 编辑

SQL Server 【优化】in & exists & not in & not exists
摘要:in && exists 如果查询的两个表大小相当,那么用in和exists差别不大;如果两个表中一个较小一个较大,则子查询表大的用exists,子查询表小的用in; 例如:表A(小表),表B(大表) select * from A where cc in(select cc from B) --> 阅读全文

posted @ 2021-03-06 16:17 杏村牧童 阅读(195) 评论(0) 推荐(1) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示