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 the process of the user request and data generating?
Explain about xml databases?
What is dbms and its application?
Explain about a primary key?
Write short notes on manual refreshes.
Where is dbms used?
There is a trigger defined for INSERT operations on a table, in an OLTP system. The trigger is written to instantiate a COM object and pass the newly insterted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better?
Who are end users in dbms?
What is the database development process?
The count() function always returns a int value type what should you do if you need to count rows from a query which you know will return a value that is too large for an int value type?
Does QTP Support the Propjects which are running in Dot Net? As we are starting with new project in Dot net need to use automation tool?Please advice & let me know what would be the best.
How to read and create .LDC data files which are used by linguatic dictionary.
On friday, you issued several insert statements using query analyzer. You then verified the data had been correctly entered with a select statement on monday, your users report that the data is not there what happened?
State the acid rules?
Explain about post-relational databases?