1 Answer

0 votes
by

self JOIN is a case of regular join where a table is joined to itself based on some relation between its own column(s). Self-join uses the INNER JOIN or LEFT JOIN clause and a table alias is used to assign different names to the table within the query.

SELECT A.emp_id AS "Emp_ID",A.emp_name AS "Employee",
B.emp_id AS "Sup_ID",B.emp_name AS "Supervisor"
FROM employee A, employee B
WHERE A.emp_sup = B.emp_id;

Related questions

0 votes
    What will be the output of the following Python code? class tester: def __init__(self, id): self.id = str(id) id="224" >>>temp ... >>>print(temp.id) a) 12 b) 224 c) None d) Error...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    What will be the output of the following Python code? class tester: def __init__(self, id): self.id = str(id) id="224" >>>temp ... >>>print(temp.id) a) 12 b) 224 c) None d) Error...
asked Jan 2, 2023 in Technology by JackTerrance
0 votes
    What is Self Hosting in WCF?...
asked Jul 26, 2021 in Technology by JackTerrance
0 votes
    What is a self-referential structure?...
asked Jan 17, 2021 in Technology by JackTerrance
0 votes
    What is self in Python?...
asked Dec 6, 2020 in Technology by JackTerrance
0 votes
    What is a self-relationship in Salesforce?...
asked Nov 12, 2020 in Technology by JackTerrance
0 votes
    What is the difference between underscore and self (i.e self.xx and _xx) ?...
asked Nov 10, 2020 in Technology by JackTerrance
+1 vote
    What is a self-referential structure in C-Programming?...
asked Nov 9, 2020 in Technology by JackTerrance
0 votes
    Automation empowers frequent releases and self-service. (1)False (2)True...
asked Oct 26, 2020 in Technology by JackTerrance
0 votes
    In self organizing network, how is layer connected to output layer? (a) some are connected (b) all are one to one ... (d) none of the mentioned Please answer the above question....
asked Aug 27, 2022 in Education by JackTerrance
0 votes
    To increase agricultural production and become self-sufficient with regard to food grains .. was initiated. ... (d) White revolution Please answer the above question....
asked Aug 14, 2022 in Education by JackTerrance
0 votes
    Choose the appropriate alternative and complete the following statements. The principle of self-determination of nations' ... , Jean Bodin) Please answer the above question....
asked Aug 4, 2022 in Education by JackTerrance
0 votes
    As it currently stands, this question is not a good fit for our Q&A format. We expect answers to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 9, 2022 in Education by JackTerrance
0 votes
    I'm learning the Python programming language and I've come across something I don't fully understand. In a method ... know very much. Select the correct answer from above options...
asked Jan 28, 2022 in Education by JackTerrance
0 votes
    There is only one question related to this and it is more about which one is better. I just don't ... exactly lies the difference? Select the correct answer from above options...
asked Jan 27, 2022 in Education by JackTerrance
...