📜  sql 声明变量单行 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:27.699000             🧑  作者: Mango

代码示例1
-- Old clunky way of doing things prior to SQL Server 2008
DECLARE @myVar VARCHAR(100);
SET @myVar = 'Some Value';

-- New, amazing way of declaring variables
DECLARE @myVar VARCHAR(100) = 'Some Value';