The most common use of VALUES is
Inser inot table name (column name 1, column name 2,......) Values (value 1, value 2,......)
----------------------------------------------------------------------------
Another way to use:
Use values to return a temporary table.
----------------------------------------------------------------------------
Grammar:
SELECT * FROM (
VALUES
(,......)
, (,......)
, (,......)
, (,......)
, (,......)
, (,......)
) as T (C1,c2,c3 ...)
------------------------------------------------------------------------------------
For example:
SELECT * FROM (
VALUES (123456), (123456), (123456), (123456), (123456)
) as T (C1)
------------------------------------------------------------------------------------
Need to be aware of the place: the number of columns to be associated with "Values (...). ) ", the number of columns in parentheses is the same, and" () "is a set of data, that is, a row of data, so the number of columns inside each parenthesis is the same.
SQL Server VALUES use one to remember