SELECT VALUES in Teradata

Viewed 7554

I know that it's possible in other SQL flavors (T-SQL) to "select" provided data without a table. Like:

SELECT *
FROM (VALUES (1,2), (3,4)) tbl

How can I do this using Teradata?

3 Answers

I am a bit late to this thread, but recently got the same error.

I solved this by simply using

select distinct 1 as a, 2 as b from DBC.tables
union all 
select distinct 3 as a, 4 as b from DBC.tables

Here, DBC.tables is a DB backend table with a few rows only. So, the query runs fast as well

Related