Eom or end of month dating is the same as zach and ashley real world dating
But seeing a single value that has been CREATE TABLE dbo.Pixie Dust ( ID int PRIMARY KEY, LOB nvarchar(max) NOT NULL, ); -- insert a value that will span at least two pages: INSERT dbo.The user might not even notice that the events returned are from the wrong date, since often internationalization is missed at the presentation layer too - so it will display 9/8/2016, just like the user typed.
Students(Student ID), Pet Count tinyint ); INSERT dbo. Many people struggle to understand this, but the easiest way to explain it is if you add a clause. Moral: Strive to understand the different logical join mechanisms, and make sure to test against all edge cases before being satisfied that your query logic is sound.Students(Student ID, First Name) VALUES(1, N'Aaron'),(2, N'Madeline'),(3, N'Nora'); INSERT dbo. Last but not least, is a really popular table hint, but most people think it's just a "go faster" button and don't realize (or ignore) that it actually still incurs locks, so its name is not entirely accurate.Pet Count(Student ID, Pet Count) VALUES(1, 1), (2, 5); SELECT s. And as I explained in Bad habits : Putting NOLOCK everywhere, there can be corruption issues and exceptions, but incorrect results can happen too.Another example Let's say we have a simple table with a Unicode column, and we want to find all the names where the first letter is in lower case.We'd expect we could do this with a case sensitive collation, but collations are funny: DECLARE @x TABLE(Last Name nvarchar(32)); INSERT @x(Last Name) VALUES(N'berthelette'),(N'Bertrand'); -- now, use COLLATE to get all lower case letters: SELECT Last Name FROM @x WHERE Last Name COLLATE Latin1_General_CS_AS LIKE N'[a-z]%'; SELECT Last Name FROM @x WHERE Last Name LIKE N'[a-z]%' COLLATE Latin1_General_CS_AS; -- wait a minute, why is Bertrand returned?
These can manifest in four different ways, all due to the way SQL Server can scan the data: The latter is the most interesting case to me, because it is not obvious (and I didn't realize it until I saw it demonstrated by Paul White).