Using OVER() to Fix Bad Version Numbers
See how the OVER() clause was used in a live system to fix overlapping field version numbers.
See how the OVER() clause was used in a live system to fix overlapping field version numbers.
A free day of training on Monday, October 24 in Seattle this year. Join MCMs, MVPs, and Friends of Redgate for a free day of training.
SQL Server's In-memory OLTP is fast, due to its multi-valued concurrency control (MVCC). MVCC avoids the need for locks by arranging for each user connected to the database to see a snapshot of the rows of the tables at a point in time, No changes made by the user will be seen by other users of the database until the changes have been completed and committed. It is conceptually simple but does the user always see the correct version of a row under all circumstances? Shel Burkow explains.
You should stick to using tables in SQL Server, rather than heaps that have no clustered index, unless you have well-considered reasons to choose heaps. However, there are uses for heaps in special circumstances, and it is useful to know what these uses are, and when you should avoid heaps. Uwe Ricken explains, and demonstrates why you'd be unwise to use heaps rather than tables when the data is liable to change.
It’s often useful to be able to create a directory of object-level scripts from an existing database, for example to put a database into version control, or search through a directory of scripts. In this simple ‘how to’ article, Feodor Georgiev expands on the four most common reasons, and shows how simple it is using SQL Compare.
SQL Server 2016 introduced three new objects to deal with the greater demand of data; John Miner takes a look at this new functionality.
Table-Valued Functions and User-Defined Types can help you write parameterised U-SQL views in an elegant manner. They also aid code reuse.
By gbargsley
Have you ever received the dreaded error from SQL Server that the TempDB log...
By Chris Yates
Artificial intelligence is no longer a distant concept. It is here, embedded in the...
Every Scooby-Doo mystery starts with a haunted house, a strange villain, and a trail...
At work we've been getting better at writing what's known as GitHub Actions (workflows,...
Comments posted to this topic are about the item The Tightly Linked View
Comments posted to this topic are about the item Build a Test Lab of...
I try to run this code on SQL Server 2022. All the objects exist in the database.
CREATE OR ALTER VIEW OrderShipping AS SELECT cl.CityNameID, cl.CityName, o.OrderID, o.Customer, o.OrderDate, o.CustomerID, o.cityId FROM dbo.CityList AS cl INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID GO CREATE OR ALTER FUNCTION GetShipCityForOrder ( @OrderID INT ) RETURNS VARCHAR(50) WITH SCHEMABINDING AS BEGIN DECLARE @city VARCHAR(50); SELECT @city = os.CityName FROM dbo.OrderShipping AS os WHERE os.OrderID = @OrderID; RETURN @city; END; goWhat is the result? See possible answers