Backup all databases & check backups
Stored procedure to backup all DB (chose user or system). You can do full, differential and log backups
2011-05-13 (first published: 2011-05-06)
3,132 reads
Stored procedure to backup all DB (chose user or system). You can do full, differential and log backups
2011-05-13 (first published: 2011-05-06)
3,132 reads
View login information for all accounts that use SQL authentication.
2011-05-12 (first published: 2011-05-09)
2,956 reads
Find the last day (or number of days in a month) in one statement without having to use IFs or BUTs.
2011-05-10 (first published: 2011-04-29)
2,427 reads
This script is used for drop and create a new or existing user. IF User is already exists in database then first it will dropped and then recreate.
2011-05-05 (first published: 2011-04-28)
1,802 reads
Excel files includes a very good functionality called Macro execution. And here we can use this functionality to write one macro that will generate INSERT statements.
2011-05-02 (first published: 2009-02-21)
16,612 reads
Returns Top 25 fragmented indexes complete with full object name and index name.
2011-04-29 (first published: 2009-05-29)
10,000 reads
Remove tab,line feed and carriage return frome text field
2011-04-28 (first published: 2011-04-21)
3,351 reads
2011-04-27 (first published: 2011-04-21)
2,748 reads
2011-04-26 (first published: 2011-04-20)
2,673 reads
Execute this script to get information on SQL server, databases, processes, memory, buffer, locks, etc.
2011-04-21 (first published: 2009-09-03)
5,657 reads
By Steve Jones
It’s time for T-SQL Tuesday again and this is a great prompt to start...
How I used AI for this postChatGPT to generate images based on info specifically...
By ReviewMyDB
My T-SQL Tuesday #202 entry for Marlon Ribunal's invitation on memorable SQL Server outages....
Hello everyone, Last week we performed an upgrade of our SQL Server instance, moving...
Comments posted to this topic are about the item Adding new column with DEFAULT
I've got a web application for my side business. I've added a SQL Server...
Which number will the COUNT() return after executing the following statements:
DROP TABLE IF EXISTS #test; CREATE TABLE #test (id INT) INSERT INTO #test (id) SELECT * FROM GENERATE_SERIES(1, 3) AS gs ; ALTER TABLE #test ADD flag BIT CONSTRAINT DF_#test_flag DEFAULT 0; go UPDATE #test SET flag = 0 WHERE id = 1 UPDATE #test SET flag = 1 WHERE id = 2 INSERT INTO #test (id) VALUES (4) SELECT COUNT(*) FROM #test AS t WHERE flag = 0See possible answers