Table Space Used in DB
A quick script that provides the sizes of the tables in your database, including schema and choice of sort method
2018-08-07 (first published: 2018-07-29)
802 reads
A quick script that provides the sizes of the tables in your database, including schema and choice of sort method
2018-08-07 (first published: 2018-07-29)
802 reads
This script uses a cursor to loop through all tables and get the count and table sizes using sp_spaceused. It is much faster and efficient than use 'SELECT COUNT(*) FROM TABLE_NAME'.
2012-06-22 (first published: 2012-06-09)
1,979 reads
2009-03-04 (first published: 2009-02-16)
1,259 reads
A better way to use sp_spaceused, returning values on one row for the database instead of two.
2008-09-04
4,060 reads
By Steve Jones
We’re a week late, once again my fault. I was still coming out of...
By Steve Jones
I ran across this article recently (https://www.gatesnotes.com/meet-bill/source-code/reader/microsoft-original-source-code) and it has a great opening piece...
By Steve Jones
I’m in the UK today, having arrived this morning in London. Hopefully, by this...
Comments posted to this topic are about the item Learning From Breakage
Comments posted to this topic are about the item Python in Action to Auto-Generate...
Comments posted to this topic are about the item Adding and Dropping Columns I
I have this table in my SQL Server 2022 database:
CREATE TABLE [dbo].[CityList] ( [CityNameID] [int] NOT NULL IDENTITY(1, 1), [CityName] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] GOI decide to add two new columns for the StateProvince and Country. What code should I use? See possible answers