dear i need to get query from 3 tables i try to show how i need result in picture hope this will explain every thing.

dear i need to get query from 3 tables i try to show how i need result in picture hope this will explain every thing.

SELECT a.item_id, c.menu_text, b.smenu_text, a.Item_Name
FROM a,b,c
WHERE a.submenu_Id = b.smenu_Id
AND b.menu_ID = c.menu_ID
Not all database engines support it but using JOINs would be better here.
Using where for join operations has been deprecated for a long time... If your database engine, I suggest you to switch to JOINs, which makes this kind of operations much easier and clearer... and sometimes, more efficient as well...
More info here: http://en.wikipedia.org/wiki/Join_%28SQL%29#Inner_join
You should use inner joins
SELECT a.item_id, c.menu_text, b.smenu_text, a.Item_Name
from a
inner join b
on a.submenu_id =b.smenu_id
inner join c
on b.menu_id=c.menu_id