I want to perform a SQL query and change the name of the columns in the result because I have 3 columns id
.
Currently my SQL looks like this:
SELECT *
FROM shopweb_tipo as st
INNER JOIN shopweb_categoria AS sc
INNER JOIN shopweb AS s
WHERE s.categoria = sc.id
AND s.tipo = st.id
I've tried to do this, but I did not get results.
SELECT *
FROM shopweb_tipo as st
INNER JOIN shopweb_categoria AS sc
INNER JOIN shopweb AS s
WHERE s.categoria = sc.id
AND s.tipo = st.id
AND shopweb.id as "id_shopweb"