|
|
|
|
|
by chrstr
1197 days ago
|
|
create table x as (select * from person);
select name from x where ...;
there you go, just configure your editor to display "create table x" as "declare x = " ;)or even a version with lazy evaluation: create view x as (select * from person);
select name from x where ...;
|
|
SQL just does not have this, it instead has 15 different second class ways to handle tables and queries that try to make up for the fact that they are not first-class values. These include CTEs, table valued functions, views, etc.