How to name an output column in the SQLite VALUES clause?

If I run this query in sqlite3(3.17.0)

select T.* from (values ​​(1 ),(2),(3),(4),(5)) as T;

I get the following output, where there is no name of the first column of T.

----------
1
2
3
4
5

How to Give a name/alias to the first column of T, or, is there a way to refer to it in some way through the index?

with cte(my_column_alias) as 
(select * from (values ​​( 1),(2),(3),(4),(5)))
select * from cte;

If I am in sqlite3(3.17 .0) Run this query in

select T.* from (values ​​(1),(2),(3),(4),(5) ) as T;

I get the following output, where there is no name of the first column of T.

---------- 
1
2
3
4
5

How to name/alias the first column of T, or, is there a way to pass the index Cite it somehow?

with cte(my_column_alias) as 
(select * from (values ​​(1),(2),(3),( 4),(5)))
select * from cte;

Leave a Comment

Your email address will not be published.