SQL JOIN / UNION not sure what to do
I have two tables
Test_items with columns Id, Barcode, Name, Cost and Age_Restriction
Stock_levels with columns Item_Id, Current_Stock, Min_Stock and Max_Stock
I am looking for a way were i have a barcode want to find the id from the barcode and then use that id to do a join on the two tables the join is below.
SELECT Test_items.Name, Stock_levels.Current_Stock, Stock_levels.Min_Stock, Stock_levels.Max_Stock
FROM Test_items, Stock_levels
WHERE Test_items.Id = Stock_levels.Item_Id
Thanks in advance for any help :)
Re: SQL JOIN / UNION not sure what to do
Not related to Java. Ask on a SQL forum.