-1

i have this situation:

TABLE ONE:

Code Quantity
1 1000
2 1222

TABLE TWO:

Code Data
1 bla bla
2 yadda yadda

i need to put the quantity column in the table 2, using "CODE" as key… Anyone who could help me with this query? I'm using LibreOffice

RESULT EXPECTED

CODE Data Quantity
1 bla bla 1000
2 yadda yadda 1222
Filburt
  • 17,626
  • 12
  • 64
  • 115
Francesco M
  • 69
  • 2
  • 3

1 Answers1

2

its a simple join :

select t1.code, t2.Data, t1.Quantity
from table1 t1
join table2 t2
   on t1.code = t2.code
eshirvana
  • 23,227
  • 3
  • 22
  • 38