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
What is meant by the degree of relationship set? The degree of relationship type is the number of participating entity types.

The physical location of a record is determined by which mathematical formula that transforms a file key into a record location? The physical location of a record is determined

Multiple-mode locks : It offers two locks: exclusive locks and shared locks. But why do we require these two locks? There are a lot of transactions in the database system that neve

Discuss the count function? The COUNT function used returns the number of tuples or values fixed in a query. The count function comprises two types of syntax: (1) COUNT (*)

Spanned and unspanned organisation? Spanned and unspanned organization: If records are not permited to cross block boundaries then the organisation is called unspanned record

Explain concept of inheritance with support of suitable example. Inheritance Inheritance is one of milestone of object-oriented programming language as it allows a creati

The Database administrator (DBA) uses the data dictionary in each phase of a database life cycle, beginning from the data gathering phase to the design, execution and maintenance p

Differentiate between the object oriented decomposition and the structured decomposition? Process-oriented (structural) decomposition divides a complex process, function or tas

Define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a pictori

.#question. Discuss the problem which may arise during concurrency control and recovery in distributed database which are not encountered in controlized database environment.