📜  声明表变量 - SQL 代码示例

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

代码示例1
DECLARE @ListOWeekDays TABLE(DyNumber INT,DayAbb VARCHAR(40) , WeekName VARCHAR(40))
 
INSERT INTO @ListOWeekDays
VALUES 
(1,'Mon','Monday')  ,
(2,'Tue','Tuesday') ,
(3,'Wed','Wednesday') ,
(4,'Thu','Thursday'),
(5,'Fri','Friday'),
(6,'Sat','Saturday'),
(7,'Sun','Sunday')    
SELECT * FROM @ListOWeekDays