2025-06-09
1,320 reads
2025-06-09
1,320 reads
Purging data from a table is a common database maintenance task to prevent it from growing too large or to stay in compliance with data retention. When dealing with small amounts of data, this can be accomplished by a simple delete with no issues; however, with larger tables, this task can be problematic. Deleting records requires a lock that can block other processes from writing or even reading the data (depending on your isolation level). In this article I will share a technique I have used to work with some very large tables.
2025-06-04
2025-06-04
512 reads
2025-06-02
563 reads
2025-05-26
472 reads
2025-05-21
412 reads
The STRING_AGG function concatenates strings separated by a specified separator. This was introduced with SQL Server 2017.
2025-05-21
The ASCII function is used to return the ASCII value for the first character in a string.
2025-05-16
Microsoft provides T-SQL developers with three functions (rand, newid, and crypt_gen_random) for generating random numbers. Each of these functions is effective at returning random values, but feature sets associated with each function make them best suited to different use cases. This tip’s Solution section presents an overview of common use cases for random numbers in SQL Server along with references to learn more about random numbers in SQL Server.
2025-05-12
Learn how to work with dates and calculate particular dates or elapsed time periods with some of the functions available in SQL Server.
2025-05-09
4,287 reads
Once upon a time I had a series about some cool stuff in Snowflake:...
By Steve Jones
“Most overnight successes – in fact any significant successes – take at least 5...
This is my late response to T-SQL Tuesday #204. I almost always forget about...
Comments posted to this topic are about the item Why Successful SQL Server Backups...
Comments posted to this topic are about the item Adding Bits II
Comments posted to this topic are about the item An Unlimited Token Budget
I have a table, dbo.bittest, where I am testing an application response. This has this structure:
CREATE TABLE [dbo].[BitTest] ( [insertdate] [datetime] NULL CONSTRAINT [DF__BitTest__insertd__300F11AC] DEFAULT (getdate()), [a] [bit] NULL ) ON [PRIMARY] GOMy application runs this code:
INSERT dbo.BitTest
(
insertdate,
a
)
VALUES
(DEFAULT, true)
GO
See possible answers