Imagem de fundo

Dadas as duas tabelas seguintes:tab1col1col2col31x12y13z2tab...

Dadas as duas tabelas seguintes:


tab1

col1

col2

col3

1

x

1

2

y

1

3

z

2


tab2

col1

col2

1

a

2

b

3

c


Resultado

a

x

a

y

b

z

c

NULL


Qual consulta retorna o resultado acima?


A

select tab2.col2, tab1.col2 from tab2 left join tab1 on tab1.col3=tab2.col1


B

select tab2.col2, tab1.col2 from tab2 right join tab1 on tab1.col3=tab2.col1


C

select tab2.col2, tab1.col2 from tab2 left join tab1 on tab1.col1=tab2.col1


D

select tab2.col1, tab1.col2 from tab2 left join tab1 on tab1.col3=tab2.col1


E

Nenhuma das alternativas está correta.