没有 FROM 的 SELECT(没有数据源)
SELECT 语句可以在没有 FROM 子句的情况下执行:
declare @var int = 17;
SELECT @var as c1, @var + 2 as c2, 'third' as c3
在这种情况下,返回一行具有表达式的值/结果。
SELECT 语句可以在没有 FROM 子句的情况下执行:
declare @var int = 17;
SELECT @var as c1, @var + 2 as c2, 'third' as c3
在这种情况下,返回一行具有表达式的值/结果。