Home » SQL & PL/SQL » SQL & PL/SQL » Is employee is manager? (SQL)
Is employee is manager? [message #578228] Tue, 26 February 2013 00:18 Go to next message
ksiva
Messages: 1
Registered: March 2011
Junior Member
Hi There,
Please refer the table below and provide me the query to find given employee is manager or not.

Refer the table below, emp#100 is manager, emp#300 is not a manager.


<emp> <emp_name> < manager >
100 Smith null
200 Ram 500
300 Shankar 500
400 Madhur 200
500 Suman 100
600 Sundar 100

Regards
Siva

[Updated on: Tue, 26 February 2013 00:21]

Report message to a moderator

Re: Is employee is manager? [message #578230 is a reply to message #578228] Tue, 26 February 2013 00:23 Go to previous messageGo to next message
xpact83
Messages: 218
Registered: October 2008
Location: philippines
Senior Member
Why don't you just check if the employee number of that employee exists in manager column?
Re: Is employee is manager? [message #578234 is a reply to message #578228] Tue, 26 February 2013 00:39 Go to previous message
Michel Cadot
Messages: 58481
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Welcome to the forum.

Note that this site will not do your homework but it will help you to succeed (see xpact83's post).
You have to show us what you did and where you are stuck and we hekp you to go further.

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" or "Preview Quick Reply" button to verify.
Also always post your Oracle version, with 4 decimals.

With any SQL or PL/SQL question, please, Post a working Test case: create table and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

Regards
Michel
Previous Topic: DBMS_SQL usages
Next Topic: How we can declare a global Variable in Package Body(Not Spec)
Goto Forum:
  


Current Time: Tue Jul 22 06:25:04 CDT 2014

Total time taken to generate the page: 0.05977 seconds