Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8720

Re: data from employee table

$
0
0

Hello Prasnth,

 

 

          You can Fetch Employee name directly from the table using select statement.

 

          and for Manager name fetch manager ID for Each Employee and Pass Manager ID as Employee           ID In the Same table You will get Manager Name.

 

 

          for Example ,

 

               EMPLOYEE table:

               empname     empid     mangerid

               peter            001          003   

               king              002          003

               raju               003          002

 

 

          if you want to Print employee 001 then fetch row with Empid 001, you will get Empname as                   'peter' then take Manager ID as 003 and again pass to the same table as empid.

 

          then row with Empid 003 will be fetched. and empname of that employee is your manager name

 

regards,

 

Pritesh Raut


Viewing all articles
Browse latest Browse all 8720

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>