What is a self join? Explain it with an example?
Answer Posted / sanchit aggarwal(oracle dev.)
CREATE TABLE EMPLOYEE(
[EMPLOYEE_ID] INT PRIMARY KEY,
[NAME] NVARCHAR(50),
[MANAGER_ID] INT
)
GO
INSERT INTO EMPLOYEE VALUES(101,'Mary',102)
INSERT INTO EMPLOYEE VALUES(102,'Ravi',NULL)
INSERT INTO EMPLOYEE VALUES(103,'Raj',102)
INSERT INTO EMPLOYEE VALUES(104,'Pete',103)
INSERT INTO EMPLOYEE VALUES(105,'Prasad',103)
INSERT INTO EMPLOYEE VALUES(106,'Ben',103)
select e1.name from employee e1,employee e2
where e1.employee_id = e2.manager_id
| Is This Answer Correct ? | 31 Yes | 12 No |
Post New Answer View All Answers
explain detail about ftp in datastage?
How to read and create .LDC data files which are used by linguatic dictionary.
What is DB Development software?
Explain about the database management systems.
Write the fastest query to find out how many rows exist in a table?
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?
Explain about post-relational databases?
Explain about relational operator join?
What are the 18 schemas?
What are the main phases of database development?
Explain about relational database management systems?
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?
Hi , any one can help me on the same,this is regarding the Informatica Function doc,i want to know how developer is will develop the mapping. pl forwar the any function doc .just for my references. svlc75@yahoo.co.in
How to use timestamp datatypes
What is a database development?