I am trying to write a very simple join on select
SELECT *
FROM (
SELECT *
FROM (VALUES ('Red'), ('Blue'), ('Green'), ('Yellow')) AS t (colors1)
) A
LEFT JOIN (
SELECT *
FROM (VALUES ('Red'), ('Blue'), ('Green'), ('Yellow')) AS t (colors2)
) B ON true
What I would like it to do, is return two columns:
Red Red
Blue Blue
Green Green
Yellow Yellow
But instead it returns each one on the left with each one on the right
Red Red
Red Blue
Red Green
Red Yellow (etc)
New contributor
dbApostle is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.