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
Types Of Indexes One of the words used during the file organisation is the term index. In this part, let us describe this term in more detail. We find the index of keywords

What is DAG? The class-subclass relationship is shown by a directed acyclic graph.eg: employees can be temporary or permanent. We might be create subclasses temporary \and perm

explain concept of decomposition?

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

What are uncommitted modifications? The immediate-modification technique permits database modifications to be output to the database whereas the transaction is still in the act

What do you understand by ACID? - ACID (Atomicity Consistency Isolation Durability) is a quality sought after in a reliable database. Here's the relevance of each quality:

Accessing information about permissions to all users- Object level permissions: With the use of data dictionary you can see the permissions to user. Let us get the table name fro

what is view?explain

How does Oracle act as ODBC and give examples of front end uses with ODBC? ODBC achieve portability at the level of the executable by introducing an extra level of indirection.

Home based assignment Consider an ORDER table with the following attributes: • Order Number (ONo),Customer Number (CNo),Customer Name (CNa),Item Number (INo),Unit Price (UP), Quant