When we use the OUTPUT
clause in SQL Server, we have the option of providing expressions instead of just the column names. For example, we could use an expression that compares the old price with the new price and returns the difference. Such data could be handy, depending on what your goals are.
Let’s dive straight into an example that uses an expression in the OUTPUT
clause.