惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

MongoDB | Blog
MongoDB | Blog
AI
AI
B
Blog RSS Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
T
Threatpost
I
Intezer
P
Proofpoint News Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Threat Research - Cisco Blogs
Google DeepMind News
Google DeepMind News
GbyAI
GbyAI
H
Hackread – Cybersecurity News, Data Breaches, AI and More
S
Schneier on Security
Webroot Blog
Webroot Blog
Recorded Future
Recorded Future
aimingoo的专栏
aimingoo的专栏
L
Lohrmann on Cybersecurity
Simon Willison's Weblog
Simon Willison's Weblog
MyScale Blog
MyScale Blog
Project Zero
Project Zero
L
LangChain Blog
B
Blog
D
DataBreaches.Net
Microsoft Security Blog
Microsoft Security Blog
F
Fortinet All Blogs
美团技术团队
Engineering at Meta
Engineering at Meta
Cisco Talos Blog
Cisco Talos Blog
D
Docker
WordPress大学
WordPress大学
人人都是产品经理
人人都是产品经理
S
Security Affairs
Attack and Defense Labs
Attack and Defense Labs
N
News | PayPal Newsroom
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
量子位
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
W
WeLiveSecurity
V2EX - 技术
V2EX - 技术
TaoSecurity Blog
TaoSecurity Blog
博客园 - Franky
P
Proofpoint News Feed
Jina AI
Jina AI
Google DeepMind News
Google DeepMind News
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
雷峰网
雷峰网
The Hacker News
The Hacker News
G
GRAHAM CLULEY

博客园 - 每天进步多一点

MySQL5.7实现row_number()和over()函数 C#学习相关系列之Linq用法---group和join相关用法 linq group by having 实现 常用知识-T-SQL优化 mysql窗口函数、Mysql分析函数 MySQL系列三(定位慢SQL、索引优化、SQL优化)Using filesort MySQL 内存相关参数设置 MySQL COALESCE 函数使用详解 SQL性能优化指南:如何优化MySQL多表join场景 MySQL内部临时表(Using temporary)案例详解及优化解决方法 cookie操作类(加密,获取,删除) MySql 5.7 索引不存在则创建,存在则忽略 数据抽取的常见理论方法 ETL系列-数据抽取(Extract) 常用时间sql语句 数据库运维:mysql 数据库迁移方法-mysqldump 了解MySQL中的JSON_ARRAYAGG和JSON_OBJECT函数 MySQL的IFNULL()、ISNULL()、NULLIF()函数用法说明 如何看懂explain工具信息,使用explain工具来分析索引 mysql 如何查看sql语句执行时间和效率
SQL SERVER年月周日超止时间
每天进步多一点 · 2025-12-02 · via 博客园 - 每天进步多一点
--当天的0点0分0秒,当天的23点59分59秒
select convert(datetime,convert(varchar(10),getdate(),120)) as a,
dateadd(ss,-1,dateadd(dd,1,convert(datetime,convert(varchar(10),getdate(),120)))) as b


--当前时间所在的周一0点0分0秒  当前时间所在的周日23点59分59秒
select  dateadd(wk,datediff(wk,0,getdate()),0) as a,
dateadd(day,6,dateadd(wk,datediff(wk,0,getdate()),0)) as b,
dateadd(ss,-1,dateadd(dd,1,convert(datetime,convert(varchar(10),dateadd(day,6,dateadd(wk,datediff(wk,0,getdate()),0)),120)))) as c


--当前时间所在的月初0点0分0秒  当前时间所在的月末23点59分59秒
 select  dateadd(month, datediff(month, 0, getdate()), 0) as a,
 dateadd(month, datediff(month, 0, dateadd(month, 1, getdate())), -1) as b,
 dateadd(ss,-1,dateadd(dd,1,convert(datetime,convert(varchar(10),dateadd(month, datediff(month, 0, dateadd(month, 1, getdate())), -1),120)))) as c 


--当前时间所在的年初0点0分0秒  当前时间所在的年尾23点59分59秒
 select  dateadd(year,datediff(year,0,getdate()),0) as a,
 dateadd(year,datediff(year,-1,getdate()),-1) as b,
 dateadd(ss,-1,dateadd(dd,1,convert(datetime,convert(varchar(10),dateadd(year,datediff(year,-1,getdate()),-1),120)))) as c