-1
  1. Create a new table. The new table will contain a class number and the name of the class manager (other names, not existing data)
  2. Write a query that will show each employee his first name, surname, and the name of his manager

I already have the first table that has all the details of the employees, and now I would like to add it to a different table with specific columns (employees first name (from first table), surname (from first table), (name of the manager (the second table))

Thank you !

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • 3
    Please have a look at [How do I ask and answer homework questions?](https://meta.stackoverflow.com/questions/334822/how-do-i-ask-and-answer-homework-questions). – Eric Brandt Jan 08 '19 at 14:32
  • Thank you! but i have tried alone and i think i need some assistant – JustAskingSmartPeople Jan 08 '19 at 14:35
  • 1
    Your question doesn't include enough useful detail for us to help you. Check out [How To Ask](https://stackoverflow.com/help/how-to-ask) and the importance of a [Minimal, Complete, Verifiable Example](https://stackoverflow.com/help/mcve). After that, [start here](https://spaghettidba.com/2015/04/24/how-to-post-a-t-sql-question-on-a-public-forum/) to edit your question as needed. – Eric Brandt Jan 08 '19 at 14:37
  • I'm voting to close this question as off-topic because questions asking for *homework help* must include a summary of the work you've done so far to solve the problem, and a description of the difficulty you are having solving it. [What topics can I ask about here?](https://stackoverflow.com/help/on-topic) – Thom A Jan 08 '19 at 14:47
  • Does this answer your question? [How do I UPDATE from a SELECT in SQL Server?](https://stackoverflow.com/questions/2334712/how-do-i-update-from-a-select-in-sql-server) –  Jan 19 '20 at 07:56

1 Answers1

1

you can do a simple join:

Select e1.FirstName, e1.LastName, e2.ManagerName
from first_table e1
inner join second_table e2
on e1.classKey = e2.classKey
Lironsh
  • 11
  • 1