Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

VALUES Usage as Table Constructor - SQL Server

RSS
Modified on Wed, May 31, 2023, 5:31 PM by Administrator Categorized as SQL Server

Code Example

with cte as (
    select * from (
    values 
         (1, 'Toyota')
        ,(2, 'Ford')
        ,(3, 'Honda')
        ,(4, 'Chrysler')
    ) as c(ModelId,DisplayName)
)
select * from cte

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.