Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
202 views2 pages

4.Q On Inner Join

The document outlines the syntax for INNER JOIN in SQL, providing both ANSI and Oracle formats. It includes a list of questions related to employee data retrieval using SQL queries, focusing on various conditions such as employee names, locations, salaries, and job titles. The questions aim to extract specific information from employee and department tables based on different criteria.

Uploaded by

Digvijay Chavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
202 views2 pages

4.Q On Inner Join

The document outlines the syntax for INNER JOIN in SQL, providing both ANSI and Oracle formats. It includes a list of questions related to employee data retrieval using SQL queries, focusing on various conditions such as employee names, locations, salaries, and job titles. The questions aim to extract specific information from employee and department tables based on different criteria.

Uploaded by

Digvijay Chavan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Rohan Singh R 1

INNER JOIN / EQVI JOIN


----------------------------
SYNTAX:

ANSI:

SELECT *
FROM TABLE_NAME1 INNER JOIN TABLE_NAME2
ON <JOIN_CONDITION>;

ORACLE:

SELECT *
FROM TABLE_NAME1 , TABLE_NAME2
WHERE <JOIN_CONDITION>;

JOIN_CONDITION: TABLE_NAME1.COL_NAME=TABLE_NAME2.COL_NAME

QUESTIONS:
-----------
1.NAME OF THE EMPLOYEE AND HIS LOCATION OF ALL THE EMPLOYEES.
2.WAQTD DNAME AND SALARY FOR ALL THE EMPLOYEE WORKING IN
ACCOUNTING.
3.WAQTD DNAME AND ANNUAL SALARY FOR ALL EMPLOYEES WHOS SALARY
IS MORE THAN 2340
4.WAQTD ENAME AND DNAME FOR EMPLOYEES HAVING CHARACTER 'A' IN
THEIR DNAME
5.WAQTD ENAME AND DNAME FOR ALL THE EMPLOYEES WORKING AS
SALESMAN
6.WADTD DNAME AND JOB FOR ALL THE EMPLOYEES WHOS JOB AND DNAME
STARTS WITH CHARACTER 'S'
7.WAQTD DNAME AND MGR NO FOR EMPLOYEES REPORTING TO 7839
8.WAQTD DNAME AND HIREDATE FOR EMPLOYEES HIRED AFTER 83 INTO
ACCOUNTING OR RESEARCH DEPT
9.WAQTD ENAME AND DNAME OF THE EMPLOYEES WHO ARE GETTING COMM
IN DEPT 10 OR 30
10.WAQTD DNAME AND EMPNO FOR ALL THE EMPLOYEES WHO'S EMPNO ARE
(7839,7902) AND ARE WORKING IN LOC NEW YORK.
11.WAQTD LOC AND AVERAGE SALARY GIVEN FOR EACH LOCATION BY
EXCLUDING ALL THE EMPLOYEES WHOS SECOND CHAR IS A IN THEIR NAME .
12.WAQTD NAME OF THE EMP AND HIS LOC IF EMPLOYEE IS WORKING AS
MANAGER AND WORKING UNDER THE EMPLOYEE WHOS EMPNO IS 7839
13.WAQTD DNAME AND EMPLOYEE ID'S OF ALL THE EMPLOYEES WHO ARE
CLERKS AND HAVING REPORTING MANAGERS.
14.WAQTD DNAME AND TOTAL SALARY GIVEN TO THAT DEPT IF THERE ARE
ATLEAST 4 EMPLOYEES WORKING FOR EACH DEPT.
15.WAQTD DNAME AND NUMBER OF EMPLOYEES WORKING IN EACH DEPT
ONLY IF THERE ARE MANAGER OR CLERKS.

[email protected]
Rohan Singh R 2

[email protected]

You might also like