MSSQL Query Blog
Dropping Temporary Table in SQL Server
Hello everyone, In this article, I will try to give information about how to drop Temp tables in SQL Server. You can easily do this using the code below. CREATE TABLE #TempTable ( ID INT, NameSurname VARCHAR(50) ); IF OBJECT_ID(‘tempdb..#TempTable’) IS NOT NULL DROP TABLE #TempTable; When you run the...
Calculating Available Disk Size in SQL Server
Hello everyone, In this article, I will try to give information about calculating the available disk size in SQL Server. You can easily do this using the code below. SELECT Drive, TotalSpaceGB, FreeSpaceGB, PctFree FROM ( SELECT DISTINCT SUBSTRING(dovs.volume_mount_point, 1, 10) AS Drive, CONVERT(INT, dovs.total_bytes / 1024.0 / 1024.0 /...