Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select tb1.*, tb2.* from tabela as tb1
- inner join tabela as tb2 on tb1.item_superior_id = tb2.item_id
- select tb1.*, (select tb2.nome_item from tabela as tb2
- where tb2.item_id = tb1.item_superior_id) as `Nome Item Superior`
- from tabela as tb1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement