Using bit columns with NULLs when three options exist in SQL Server
Frequently surveys ask yes/no questions and use a bit datatype. What are the effects of allowing this column to be NULL in a SQL Server table? Check out this tip to learn more.
Frequently surveys ask yes/no questions and use a bit datatype. What are the effects of allowing this column to be NULL in a SQL Server table? Check out this tip to learn more.
In this article you will be see how to group data using the simple GROUP BY clause, in order to summarize more complex data.
Today Steve Jones reminds us that we are all selling something in technology, even if it's our reputation. We ought to be truthful in our dealings with our clients.
With the release of Master Data Services (MDS) for SQL Server 2008R2, it is now possible to perform XML transformations on the database server.
Microsoft SQL Server is able to create very efficient query plans in most cases. However, there are certain query patterns that can cause problems for the query optimizer; this article describes four of these patterns.
The cloud changes the way that we can administer and deploy changes to our systems. Steve Jones highlights an interesting idea, and hopes we get similar techniques applied to databases in the cloud.
A great article that should answer all your questions about the transaction log from MVP Gail Shaw. A must read for all DBAs.
The XML Data type has definite uses, but the way of interrogating, retrieving, and manipulating the values of properties and attributes within XML have been so foreign to the SQL language as to be somewhat of a barrier to their use. Fortunately, Robert Sheldon has once more managed to make the subject accessible to those of us who just need to get the job done.
Learn how to get setup with PowerShell and SQLPSX from MVP Aaron Nelson, one of the experts teaching us how to use Powershell for SQL Server.
A RAG pipeline that answers questions in the demo is not the same thing...
By Steve Jones
“A multitude of bad ideas is necessary for one good idea” – from Excellent...
Yesterday I gave a talk for MSSQLTips called “Building a DBA Agent for Your...
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...
Comments posted to this topic are about the item Looking for New Blood
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