How to show the head of a Department in first line

Hi all

I have a question where I want to display all employees in a Department, but I want to show the head of service
always in the first line, to say that department_head is a foreign key in the department table.

Please let me know how to achieve this.

Thank you
Tauceef

The Manager of a depament would work in the same Department?
If yes then this query will return this employee twice...

Select ename
from (
Select ename, 2 as sortorder
From dept d, emp e
Where e.deptno=d.deptno
Union all
Select ename, 1 as sortorder
From emp e, dept d
Where d.mgrno = e.empno)
Order by sortorder

Tags: Database

Similar Questions

  • How to show the photo album in Apple Tv screensaver.

    How to show the photo album in Apple Tv screensaver. ?

    You can use your photo stream or albums shared for the screen saver, the iCloud photo library can be viewed only manually.

  • How to show the ink levels on the computer for Officejet 6600

    How to show the ink levels on the computer for Officejet 6600

    What is the full product name or product number?

    is your printer?

    This is the Manual of your printer the following image was derived.

    You can use the printer's built-in web server to get the status of the printer information from a browser.

  • How to show the multiple declaration for an application

    How to show the multiple declaration for an application

    Thanks for your suggestions...

    Looking at the javadocs you can only save an indicator by application. You will need to do three separate applications and package them as an If you want three different indicators to be visible at a time. Or change the flag that (or which group) of the indicators you want to display.

  • How to show the main screen (home screen of blackberry)

    Hi guys,.

    I need to know how to show the main screen (home screen of the blackberry), even if it's in any screen (like saying "Calculator" etc)...

    This must be done by programming... is there a solution for this?

    Thanks in advance,

    I also had. This is to disconnect incoming call and display the main screen (home screen of the blackberry).

    EventInjector.invokeEvent (new EventInjector.KeyCodeEvent (EventInjector.KeyCodeEvent.KEY_DOWN, (char) Keypad.KEY_END, 0, 100));
    EventInjector.invokeEvent (new EventInjector.KeyCodeEvent (EventInjector.KeyCodeEvent.KEY_UP, (char) Keypad.KEY_END, 0, 100));

  • How to display the header in the mail window 8 application?

    How to display the header in the mail window 8 application?

    Original title: Mail

    How to display the header in the mail window 8 application?

    Hi Daniel

    The Mail App is a cloud application, you get local copies of emails where you can view the header information.

    You must either display your email with your browser or a desktop e-mail application, such as Windows Live Mail.

    Concerning

  • How to show the photograph next to a project?

    How to show the photograph next to a project?

    in Adobe MyPortfolio

    It isn't a way by default to show them side by side, but we are looking in new views of project for the future.

  • Photoshop Elements 8, how to show the value, the hue and saturation of a specific area of a pickture?

    Hello

    Photoshop Elements 8, how to show the value, the hue and saturation of a specific area of the image?

    How to choose the area? Which tool?

    Thank you in advance, Karl

    Make sure first that your range of information is visible: window menu / Info (shortcut F8)

    In this palette, click the small icon 'more '.

    Select "Palette Options".

    and choose HSB to second reading of palette.

  • How to show the timer as a progress as 1,2,3,4 bar... on the modal page

    Hi Experts,

    I have a condition where the loading of the page (before the page header), I'm calling a webservice

    so I need to check the response time of this web service so I want to show the timer as a progress as 1,2,3,4 bar...

    Another is the response time is more than 10 seconds if I have to stop the process of webservice

    and to show that "No. Results" to the user.

    Please suggest a solution how to get there.

    Thanks in advance

    Concerning

    Jitendra

    This is an export of the demo app.

    http://sqlprompt.S3.amazonaws.com/ProgressBarDemo.SQL

    Original poster wanted some other features like 1,2,3,4 and stop at or after 10 seconds. Here, the framework should allow these options. You should especially the interval mark and the set value. You can check the value of stop at 100% like I did or stop at the 10 If you set the interval to 1 second.

    Greg

  • How to show the mouth full function

    Hi all, I'm sure this is a stupid question, but I can't seem to track it down.

    When I use the Palace of function, it shows a view of abbreivated, Express, Favorites, user libraries and then an arrow down to show the rest of the Palace.

    How can I put it so that it always opens the mouth (as if you had hit the arrow down)?

    Thank you

    (If you get the palette via right click, you will need to nail it down to see the 'view' button).

    Press 'view' in the top right, select "Change the visible categories", then tap on ""select all "." Quite.

  • How to set the header and footer settings

    HP Officejet Pro 8600 - N911a

    Windows 7 64 bit

    Printer wireless

    Using the Firefox browser

    I finally found where I can go to define the parameters of the header and footer: file then page setup

    However, I don't know what numbers to put in the top, bottom, left and right margins so that the header and the footer is printed when I print anything.

    It is only printing on the bottom half of the header at the top and the low foot.

    Also, how can I print only a "selection" of a page.  I highlight the part that I want to print only, but I don't know how to do this.

    Any help is greatly appreciated.

    Thank you.

    You encounter formatting problems are a matter of the browser you use and the format that it allows. There are modules of your browser that may allow you more features, but that would depend on the application itself. Also you can see one of the other browsers (Chromeor IE and see if they have the features you are looking for.)

    In regards to printing a section of the page, I advise to use the tool captures (just type in the menu START and type this program) which will essentially allow you to take screenshots of areas only you want to print. You can then print or save, or do both.

    Let me know!

  • How to clean the head on DeskJet 1000

    Hello!

    I have a DeskJet 1000 printer. Sometimes I have vertical lines on the printed image (dirty head) but I can't find the head cleaning tool. How can I clean the head on this printer? I found nothing in the menus.

    I use Windows XP Professional.

    Thank you. I found the problem. carrtidge not loaded correctly.

  • How to show the number n of labelfields in a HFM without roller horizontal sc

    Hi all

    I want to show n number of labels without scrolling in a HFM areas, how?

    The suggestion above reduces to a minimum the width given to each LabelField so that they fit.  If you want just the overlow when the screen width has been reached, try FlowFieldManager.

  • How to show the loading (wait screen) with animated image dialog between the screens

    Hello

    Can anyone show how to insert the load between two screens dialog, while the second screen is taken

    loading time?

    I tried the examples given in the forum but no luck

    There is an update about it here:

    http://supportforums.BlackBerry.com/T5/Java-development/sample-quot-Please-wait-quot-screen-part-1/t...

    Note comment added to the article as well - this is a useful Variant.

  • How to show the Red Asterik (*) symbol on the icon of the application

    Hello

    Someone help me...

    As if any message or mail will come then respective icons on the homescreen red list * on them if they r not answered

    How to do the same thing for the application that I developed to send n receive messages. I mean if no msg come to my request

    I want to show the red * symbol on my application icon...

    It is posible right...

    Which API is to use how n...

    Thanks in advance...

    Now, I think that there is nothing wrong with this marker with an accepted solution...

    Thank you!

Maybe you are looking for