inner join in sql

Posted by vini on Stack Overflow See other posts from Stack Overflow or by vini
Published on 2011-06-27T16:19:35Z Indexed on 2011/06/28 16:22 UTC
Read the original article Hit count: 182

Filed under:
|
SELECT TotalItems.Total_Items
  ,TotalItems.No_Items_Present
  ,ItemsTable.No_Of_Items_Ret 
FROM TotalItems 
INNER JOIN ItemsTable ON 
   ItemsTable.Item_Name= '" + DropItemName.SelectedValue + "'"

this is my SQL query what I want is to retrieve two column values corresponding to the item I enter in my dropdown list from one table and the no_of_items_ret from another table satisfying the condition of the dropdownlist

I'm getting all the values corresponding to any item I enter what should i do?

© Stack Overflow or respective owner

Related posts about sql

Related posts about inner-join