List columns data type and size for every table in a database
This script will list columns data type and size for every table in a database.
2009-09-15 (first published: 2009-09-02)
2,019 reads
This script will list columns data type and size for every table in a database.
2009-09-15 (first published: 2009-09-02)
2,019 reads
Query to generate a dynamic Select statement from any table for moving data between servers.
2009-09-11 (first published: 2009-09-01)
1,622 reads
this code encrypts all stored procedures that meet a certain format. this code is easy to change to suit your particular needs, but be sure to back up your stored procs first.
2009-09-10 (first published: 2008-11-21)
3,333 reads
2009-09-09 (first published: 2009-08-31)
1,315 reads
2009-09-08 (first published: 2009-08-31)
488 reads
To find date at nth occurrence of a weekday in a month and year
2009-09-07 (first published: 2009-09-01)
756 reads
2009-09-04 (first published: 2009-08-31)
2,298 reads
This script copies all tables found in a specific filegroup to another specific filegroup.
2009-08-19
115 reads
Find all Procedures, Views, Functions that have been renamed with sp_rename where syscomments does not match.
2009-08-17 (first published: 2009-08-06)
965 reads
Utility stored procedure to create non-xml format file for BCP/BULK INSERT processes. Very useful for text-qualified CSV files.
2009-08-14 (first published: 2009-08-04)
2,420 reads
By Steve Jones
Thanks to everyone that attended my sessions at VS Live San Diego yesterday. It...
By Steve Jones
I was creating a question on sp_readerrorlog and realized that this procedure is different...
By SQLPals
Why sys.fn_dblog Is Undocumented And Why It's Still There Why sys.fn_dblog...
Comments posted to this topic are about the item Implementing Type 4 Slowly Changing...
Comments posted to this topic are about the item The Disabled Index
Comments posted to this topic are about the item Server-Level Table sizes
I run this code on SQL Server 2022.
CREATE TABLE Drink
(
drinkid INT NOT NULL
CONSTRAINT DrinkPK PRIMARY KEY CLUSTERED,
drinkname VARCHAR(20),
rating NUMERIC(2, 1)
)
GO
INSERT INTO Drink
(
drinkid,
drinkname,
rating
)
VALUES
(1, 'Margarita', 4.5),
(2, 'Mojito', 4.3),
(3, 'Old Fashioned', 4.7),
(4, 'Martini', 4.4),
(5, 'Cosmopolitan', 4.2)
GO
ALTER INDEX drinkpk ON dbo.drink DISABLE
GO
SELECT * FROM dbo.Drink
GO
What is the result? See possible answers