What is a self join? Explain it with an example?
Answer Posted / kannan
CREATE TABLE IF NOT EXISTS `emp` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(50) collate latin1_general_ci NOT NULL,
`dept_id` int(11) NOT NULL,
`mgr_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
)
SELECT e2.name Employee_name, e1.name Manager_name
FROM emp e1, emp e2
WHERE e2.mgr_id = e1.id
| Is This Answer Correct ? | 12 Yes | 8 No |
Post New Answer View All Answers
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
What is the physical representation for a many-to-many relationship?
How you can make a parameterized view?
Any sample or model question of punjab national bank for deputy manger IT or any sample of PNB.any1 plz do send on
What is normalization? Explain different levels of normalization?
How can you fix a poorly performing query?
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?
1. Using the XML Document below, with the URI “recipe.xml”
define
the following queries in XQuery:
a.) Give the names of all breakfast in the menu.
b.) Select breakfasts that have price lower than $7.00?
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 maximum length of an extended property?
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?
What is dbms explain in brief?
What are the three basic rules which are to be followed for the relational model of the database?
Explain about a primary key?