Java's String.hashCode() function in T-SQL
T-SQL function to takes a string and produce an integer hashcode matching what is produced by the Java String.hashCode() method.
2008-08-04 (first published: 2008-06-11)
1,366 reads
T-SQL function to takes a string and produce an integer hashcode matching what is produced by the Java String.hashCode() method.
2008-08-04 (first published: 2008-06-11)
1,366 reads
This is an addition to Jim Rea's "Get record count for a specific database". I modified it to loop through all databases and provide counts.
2008-08-01
1,201 reads
Grant permissions to specific objects in Database using dynamic SQL.
2008-08-01 (first published: 2008-06-08)
2,673 reads
2008-08-01
849 reads
2008-07-29 (first published: 2008-06-08)
1,305 reads
2008-07-28 (first published: 2008-05-28)
4,343 reads
This script is a quick throw together that tells you which rows in a table have the most data
2008-07-25 (first published: 2008-06-10)
860 reads
Quick way to get all users on all Databases
2008-07-24 (first published: 2008-06-06)
1,692 reads
2008-07-23
490 reads
2008-07-23 (first published: 2008-06-05)
1,249 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