I have a table in the following structure:
| campo1 | campo2 | campo3 | campo4 |
| --------------------------------- |
| valor1 | valor2 | valor3 | valor4 |
| valor5 | NULL | NULL | valor8 |
Among other non-relevant columns
I am restructuring the bank, and need to transform into a structure like this:
| campo |
| ------ |
| valor1 |
| valor2 |
| valor3 |
| valor4 |
| valorN |
Is it possible to do this with SQL only? How?
There are 4 columns that I need to transform into 4 rows or less (some fields are null). The primary key is not being referenced elsewhere, not being imported (it already deletes the field and I will insert it again when the table is restructured)