Monday, January 19, 2015

Sql query in oracle ( My write )


 Value get from 2 table :
select t. thrapgrp_name,t.thrapgrp_id from pm_theragrp t,pm_thrapgrp_atc a where t. thrapgrp_id=a.thrapgrp_id


 Value get from 3 table using AND :
SELECT t.thrapgrp_name, t.thrapgrp_id, g.generic_no, G.GENERIC_NAME
  FROM pm_theragrp t, pm_thrapgrp_atc a, PM_GENERIC G
 WHERE t.thrapgrp_id = a.thrapgrp_id
 AND A.GENERIC_NO=G.GENERIC_NO

No comments:

Post a Comment