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 my program is accesing data from two db2 databases.what is the bind card for this program to genarate plan? how to specify the two owners and two qualifiers in bind card
Explain about query and reporting.
What is database design and development?
State the acid rules?
What is an application role and explain a scenario when you would use one?
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?
Explain about network model?
If a column is an image value type, how you can compare column values? How can you use this column in join clause?
What are the main phases of database development?
What is a database development?
What are the three types of database design?
What is dbms explain in brief?
In which database can extended stored procedures be added?
What you can do to remove data from the cache and query plans from memory for testing the performance of a query repeatedly?
How long can an error message be in raiseerror function?