Table variables is like of temporary table in TSQL,
Table variables is useful for storing variables in the tables format.
by using table variables, table functions can be found here, and its profits, tablevariables will automatically clear out after a store procedure or function call is complete.
Example Table variables:
DECLARE @table AS TABLE (
id INT,
Nama VARCHAR(50))
INSERT INTO @table VALUES (1, 'namaku')
INSERT INTO @table VALUES (2, 'namanya')
SELECT * FROM @table
see the image:
Advertisement
