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
courier company er-diagram

Discuss the mechanism to read data from and write to a disk? Disk read/write heads are mechanisms in which read data from or write data to disk drives. The heads have gone by

Describe the two types of methods for retrieving rows in Python? Fetchone()- Returns the next row as a sequence Fetch all()- Returns the entire result set like a strin

The participation Constraints shows whether the existence of an entity depends on its being associated to another entity by the relationship type. There are two kinds of participat

What is Distributed system ? Distributed System - A distributed system consists of a number of processing parts in which are interconnected through a computer network and in

State the Component Diagram A component diagram represents a set of component and relationships among them. In a dynamic model, component diagram is used to model physical com

Explain the concept of a data model ? Data Model - Model is an abstraction procedure which hides irrelevant details although highlighting details relevant to the application

In Database software have only pure security or some dis secured by administrator?


Explain Interfaces for parametric Users? Interfaces for Parametric Users - Parametric users, such as bank tellers, frequent have a little set of operations in which they must p