Select from stored procedure
This terse script shows an easy (but "dirty" - so not advisable for production environments - rather for personal use) way to select data from stored procedure.
2011-12-14 (first published: 2008-03-04)
4,194 reads
This terse script shows an easy (but "dirty" - so not advisable for production environments - rather for personal use) way to select data from stored procedure.
2011-12-14 (first published: 2008-03-04)
4,194 reads
This script will generate a restore statement with supporting MOVE operations to a new directory structure.
2011-12-13 (first published: 2008-05-29)
3,918 reads
Reports permissions to three levels: database, schema and table -- in three formats: readable, structured, scripted.
2011-12-12 (first published: 2008-02-22)
3,976 reads
The procedure below deletes all records from the specified database's(except master, model, msdb and tempdb) tables (except those from the schema 'sys').
2011-12-09 (first published: 2008-01-31)
4,220 reads
2011-12-08 (first published: 2011-11-23)
1,153 reads
This script validates the sufficient disk space per drive.
When you'll reach a minimum on a diskdrive, the script will mail all recipients.
2011-12-06 (first published: 2011-10-28)
4,080 reads
2011-12-01 (first published: 2011-11-09)
1,294 reads
This command is the equivalent of the LEFT() function (cumbersome but effective)
2011-11-29 (first published: 2011-11-14)
1,185 reads
ntext, text, and image (Transact-SQL). This script will alter the data type from image to
varbinary(max) which is very much required as the data type is out
of support.
2011-11-28 (first published: 2011-11-14)
881 reads
A SELECT statement which includes the alpha description of each job's schedule
2011-11-25 (first published: 2007-11-01)
4,580 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