Multiple column queries-syntax, Database Management System

Multiple column Queries:

Syntax:

SELECT COLUMN1, COL2,......

FROM TABLE

WHERE (COLUMN1, COL2, ...) IN

(SELECT COLUMN1, COL2,....

 FROM TABLE

WHERE );

Example: Find the department number, name, job title and salary of those people who have the similar job title and salary as those are in department 10.

SELECT DEPTNO,ENAME, JOB, SAL

FROM EMP

WHERE (JOB, SAL) IN (         SELECT JOB, SAL

                                                 FROM EMP

                                                 WHERE DEPTNO=10);

OUTPUT:

DEPTNO

ENAME

JOB

SAL

10

Nirmal

MANAGER

2975

10

Kailash

ANALYST

3000

20

Ashwin

ANALYST

3000

Posted Date: 3/11/2013 4:01:33 AM | Location : United States







Related Discussions:- Multiple column queries-syntax, Assignment Help, Ask Question on Multiple column queries-syntax, Get Answer, Expert's Help, Multiple column queries-syntax Discussions

Write discussion on Multiple column queries-syntax
Your posts are moderated
Related Questions
Identification of concurrency Identification of concurrency: Dynamic model identifies concurrency. Two objects are said to be parallel (concurrent) if they can receive events a

Which operator is used to compare a value to a list of literals values that have been specified? BETWEEN operator is used to compare a value to a list of literals values that h

What is the difference among a primary index and a secondary index? Primary Index: A primary index is an ordered file whose records are of fixed length along with two fields.

What is DML compiler? DML Compiler: Translates DML statements in a query language within low level instructions understandable through the query evaluation engine. Attempts to

WRITE SHORT NOTES ON INDEX STRUCTURE OF FILES? There are two basic parts of indices 1.   Ordered indices 2.   Hash indices Every technique must be evaluated on the bas

Which element in the database can modified by changing the data dictionary? Data elements in the database can be changed or modified through changing the data dictionary.

Difference between LEFT OUTER JOIN and RIGHT OUTER JOIN In left outer join tuples from the left-hand-side relation which do not match any tuple in the right-hand-side relation

System error :These contain errors in database system or the OS, example, deadlocks.Such errors are fairly hard to detect and need reprogramming the erroneous components of the sys

Have a look around the site, and at some of the sites they have featured. These are all examples of bad design, and also offer an explanation about why they fall into this category

Our company hires independent contractors to install equipment at precise locations across North America. We want to track the installation data and generate reports. The compan