Needing help with Sqlite and zeos connex lazarus / 16-Databases ---------------------------------------------------------------------- Buraa · 2021-01-23 13:27 Hello guys I've two tables named Premix and FeedPremix Premix_table has two col < premix name & premix ID > while Feedpremix _table has four col < Feed_ID , premix ID , Premix Quantity  & premix quantity ID > while both feedID and premix_quantityID are primary keys how do i get the query to pull both Premix name and premixquantity based on premixID thanks ---------------------------------------------------------------------- speter · 2021-01-23 23:59 Buraa, Welcome to the Lazarus forum! If I understand you correctly, you want to know the SQL for  the query. I think that would be: select PremixName, PremixQuantity from Premix_table, Feedprimix_table where Premix_table.premixID=Feedprimix_table.premixID Note that I removed some spaces from your Field / Table names. cheers S.