顯示具有 SQL 標籤的文章。 顯示所有文章
顯示具有 SQL 標籤的文章。 顯示所有文章

2023/04/11

SQL 相關

 最後一筆

SELECT * FROM 

(SELECT *,

ROW_NUMBER() OVER (PARTITION BY OrderID ORDER BY CDate DESC) Sort

FROM OrderDetail) R

WHERE R.Sort = 1 

'--取得當天日期
select getdate()   

--取得從系統開始日至今日的時間差(long型態)
select datediff(m,0,getdate())    

--取得當月的第一天
select dateadd(m, datediff(m,0,getdate()),0)

--當月的最後一天 = 下個月的第一天 - 1
select dateadd(day ,-1, dateadd(m, datediff(m,0,getdate())+1,0))  

刪除 SQL Server Management Studio 的連線 List

 https://stackoverflow.com/questions/349668/removing-the-remembered-login-and-password-list-in-sql-server-management-studio



SQL Server Management Studio 2017 delete the file C:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\14.0\SqlStudio.bin

SQL Server Management Studio 2016 delete the file C:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\13.0\SqlStudio.bin

SQL Server Management Studio 2014 delete the file C:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\12.0\SqlStudio.bin

SQL Server Management Studio 2012 delete the file C:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\11.0\SqlStudio.bin

SQL Server Management Studio 2008 delete the file C:\Users\%username%\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin

SQL Server Management Studio 2005 delete the file – same as above answer but the Vista path. C:\Users\%username%\AppData\Roaming\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat

JR九州鐵路周遊券

全九州版 / 北部九州版 / 南部九州版 https://www.jrkyushu.co.jp/chinese/railpass/railpass.html https://www.klook.com/zh-TW/activity/2371-jr-kyushu-jr-pass/ ...