T-SQL 101: 19 Querying literals, expressions, and functions in T-SQL
Apart from data just in a table SQL server can select other things like the ones shown here:
If I say SELECT 2, it just returns the value 2.
If I say SELECT ‘Hello’, it just returns Hello.
Both of those are examples of what’s called a literal value, which is an exact value that doesn’t change.
SELECT 4 + 5 is an example of an expression. This is where we can work something out to get the value that needs to be returned. No surprise, that will return 9 just as you’d.
2019-05-27