What is a self join? Explain it with an example?
Answer Posted / vijayan.t
A table join to itself is known as self join.
select e1.empid,e1.empname,e1.empmgrname where empmgrid =
empid;
here in a single table e1 having three fields(employee id,
employee name,manager id)one employee's manager id is
another one employee's employee id so compare that 2 ids and
we can get the particular employee's manager name...
| Is This Answer Correct ? | 4 Yes | 5 No |
Post New Answer View All Answers
What is data modeling with example?
Pgm A calls Pgm B and pgm B uses cursor, when pgm B is called second time, the program is abending saying the cursor is opened? Why?
What are the constraints on severity level in raiseerror?
When installing the datastage7.5x2 edtion iam getting aproblem i.e the cpu count is 2 but the cpu count in installation is one . how can i install in my p.c (system is dual core).
You have a table with three columns: amount1, amount2, and amount3 in a single row only one of these three columns will have a value and the other two will be null. Write a sql query to retrieve the values from these columns?
Explain the cube operator?
Which four data types cannot be used as a return type from a user-defined function?
Explain what a database is?
How can you fix a poorly performing query?
How is data stored in dbms?
How you can make a parameterized view?
Who are naive users?
How to use online Backups?
You have two tables with a one to many join based on a field named id. You need to find records in the parent table that are not represented in the child table. how would you accomplish this?
What are the 18 schemas?