Generate script to change column length of string datatypes in a DB
This script can be used to generate alter column length of any string data type column(s) in a database.
2011-12-27 (first published: 2011-11-22)
1,269 reads
This script can be used to generate alter column length of any string data type column(s) in a database.
2011-12-27 (first published: 2011-11-22)
1,269 reads
This script can be used to return a csv column such emails in separate rows
2011-12-26 (first published: 2011-09-14)
1,559 reads
These scripts give you the list of logins created in the Last X Days for SQL Server 2000 or 2005.
2011-12-23 (first published: 2008-06-08)
2,364 reads
These scripts were generated to standardize our SQL backup environments, and to remove backups from Maintenance Plans.
2011-12-22 (first published: 2008-01-29)
3,470 reads
A Sudoku solution with set based T-SQL approach utilizing binary values and operators, to ease the algorithm.
2011-12-21 (first published: 2008-04-30)
4,216 reads
This script will find foreign keys (on referencing table) that are not indexed in SQL Server 2005.
2011-12-20 (first published: 2007-08-10)
3,770 reads
Best way to monitor Excel, Access, SQL Linked Servers from SQL 2005
2011-12-19 (first published: 2008-06-03)
3,329 reads
2011-12-16 (first published: 2007-12-27)
4,110 reads
Named or default instance, this will check info like Virtual Server Name, Cluster Name , Current owner, Preferred Owner? and? Status? (if clustered) and IP/Port for the current instance.
2011-12-15 (first published: 2007-10-11)
3,606 reads
2011-12-14
373 reads
When I put together the invitation for T-SQL Tuesday #202, I wasn't sure what...
By Steve Jones
My life has some crazy travel stretches for sure. Between speaking, office visits, customer...
In Part 1, we saw how ‘Vamana’ represents vectors as nodes, connects them with...
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