I want to create a table where each column is a distinct value retrieved from select query.
Example:
[Query]
SELECT DISTINCT col
FROM table
[Result]
col
---
val1
val2
val3
val4
Requested table:
Column1 | Column2 | Column3 | ... | ColumnN
-------------------------------------------
val1 | val2 | val3 | ... | valN
There is an unknown number of distinct values. All columns should be create as type TEXT.
Is this possible using SQL without procedures?
Thanks.