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 should be included in this???

, write the relational schema, and draw the new dependency diagrams. Identify the normal forms for each table structure you created

Lack of Redundancy We have talked about the problems of repetition of information in a database. Such repetition should be stay away as much as possible. Let us state once again t

You must implement the entity relationship model provided in the model solution to Assignment 1. The model solution will be released on the course website approximately TWO (2) we

What Is Recovery?  During the life of a transaction, i.e., a after the start of a transaction but before the transaction commits, various changes may be made in a database state

What is transaction? Collections of operations that form a single logical unit of work are known as transactions.

Define check point and its impact on data base recovery.                  Ans:  There could be hundreds of transactions handled per minute, in a large on-line database system.

An example of a weak entity is Staff because the availabilityID cannot be uniquely identified unless it is used in conjunction with the foreign key known as availabilityID in the A

An ideal data dictionary should have everything a DBA wants to know about the database. 1 Conceptual, External, and internal database descriptions. 2.    Descriptions of attr

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