-
-
Save anonymous/e1fc67ee961306422413 to your computer and use it in GitHub Desktop.
Table Variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--資料表變數名稱的前置詞 (@table_name) | |
--儲存於記憶體(Ram) | |
--批次指令執行完成後即自動被刪除 | |
DECLARE @tbl_TMP TABLE ( | |
EmpID varchar(20), | |
Name varchar(100) | |
) | |
INSERT INTO @tbl_TMP | |
SELECT TOP 10 EmployeeID ,FirstName | |
FROM [Northwind].[dbo].[Employees] | |
SELECT * FROM @tbl_TMP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment