0
I am trying to create a subselect in the same column, I have to use a column row to return a new value from the column itself.. follows my sql code
SELECT `idUnidadeOrganica`, `NmUnidadeOrganica`, `idUOSuperior`,
(SELECT `NmUnidadeOrganica` FROM `unidadeorganica` WHERE `idUnidadeOrganica` = `idUOSuperior`),
`SgUF`
FROM `unidadeorganica`;
In case I’m trying to return the name Nmunidadeorganica that has your idUnidadeOrganica equal to the idsuperior.