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
Though all the ABAP/4 Dictionary Structures that exists in the structure of the LDB, being described in Database Program, we are explaining the Dictionary Structures in the Report.


Create Relational Database Model (RDM) for Sailing bed and breakfast club Table_Name( attribute_1, attribute_2, attribute_3, ? ,attribute_x) Primary Key ( attribute_1, attribute_2)

What is the difference between the function module and a normal ABAP/4 subroutine? In contrast to normal subroutines function modules have uniquely exact interface.  Declaring da

Benefits and Limitations od Data Models?

What is Interaction Diagram An interaction diagram shows an interaction, comprises of a set of objects and their relationships including the messages that may be dispatched be

Distributed Control and Data sharing: The geographical distribution of an organization can be showed in the distribution of the data; if a number of different sites are linked to e

QUESTION (a) Consider a car database consisting of car model, car make, car origin, Engine capacity, color, cost.


Differance between Unordered and ordered file ? Unordered file do no has any sequence although ordered file has arranged in a few sequence and data are assigned in ordered form