Skip to content

Instantly share code, notes, and snippets.

@Bilbottom
Created May 21, 2024 20:24
Show Gist options
  • Save Bilbottom/7234e362c573480496d84b4a78485000 to your computer and use it in GitHub Desktop.
Save Bilbottom/7234e362c573480496d84b4a78485000 to your computer and use it in GitHub Desktop.
The SQL `VALUES` statement
/*
The SQL `VALUES` statement (in DuckDB)
DuckDB version: 0.10.2
Bill Wallis, 2024-05-21
*/
select version();
values (1, 'alex'), (2, 'blake'), (3, 'charlie');
from values (1, 'alex'), (2, 'blake'), (3, 'charlie') as v(id, username);
with usernames(id, username) as (
values (1, 'alex'), (2, 'blake'), (3, 'charlie')
)
from usernames;
@Bilbottom
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment