Home > Blockchain >  How to get data from sub-table?
How to get data from sub-table?

Time:11-20

i have "transaction" table and it has date_of_transaction, transaction_number, item_number columns. it has rows. also i have "item" sub-table. they linked with "item_number". there are item_name and item_category columns for "item" table. i want to print rows with item_name and transaction_number. how can i make it?

CodePudding user response:

select transaction_number, item_name
from transaction t 
join item i on t.item_number = i.item_number
  • Related