Validating null values in a column without using ISNULL or NVL.
We can check for null values using count.
2016-02-26 (first published: 2016-02-16)
1,197 reads
We can check for null values using count.
2016-02-26 (first published: 2016-02-16)
1,197 reads
SQL Agent job to cleanup all old text files on the errorlog directory.
2016-02-25 (first published: 2016-02-23)
475 reads
If you need to change multiple SQL Server Services accounts across your environment, Powershell can do that for you.
2016-02-24 (first published: 2016-02-19)
6,766 reads
Running the sp_change_users_login @Action=Report against all databases with a simple cursor wrapped around it.
2016-02-23 (first published: 2016-02-04)
1,305 reads
Script finds char types columns defined to allow NULL values but have non NULL values and generates the ALTER statements for the changes.
2016-02-22 (first published: 2016-02-08)
1,034 reads
Gives execute permission on all user-defined types for the specific user
2016-02-19 (first published: 2016-02-03)
856 reads
To show SQL Server and physical server details upon instance restart so that we have visibility of unexpected issues with servers and services.
2016-02-18 (first published: 2016-02-04)
750 reads
Enhanced version of Index Rebuilt Script originally written by Michelle Ufford, which now includes latest version updates and additional features.
2016-02-17 (first published: 2016-02-04)
1,951 reads
The script will restore the all the transaction logs files generated by Red Gate after extracting into .trn files.
2016-02-16 (first published: 2016-02-02)
535 reads
2016-02-15 (first published: 2016-01-29)
970 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