G
G
gowwa1232020-11-02 19:01:03
PostgreSQL
gowwa123, 2020-11-02 19:01:03

I want to merge two columns into one, how to do it?

And how to combine the values ​​​​in columns A and B, in which there are entries in cell A is 1, and in cell B it is 2, how to make them be in the same column, but in different cells?
So that it gives out like this:
Name_of_new_column
1
2

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Vodakov, 2020-11-02
@WaterSmith

SELECT
ColumnA AS NewColumn
FROM table
UNION
SELECT
ColumnB
FROM table

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question