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
management information system based on functional organisation

MySQL Database Merge Project Description: I have two databases, I need merge the data of one database into another Work to be done online right now. Payment can be done

Which operator is used to compare a value to a list of literals values that have been specified? BETWEEN operator is used to compare a value to a list of literals values that h

Question (a) Differentiate between the following terms: (i) Distributed Database v/s Distributed Database management System (ii) Homogeneous Distributed Database v/s Hete

HOW TO SOLVE THE LP Problems by simplex method?z=x1+-3x2+2x3

Which data type can store unstructured data? Raw data type can store unstructured data.

Domain Constraint It shows that each attribute in a relation has to contain an atomic value only from the corresponding domains. The data types associated with commercial RDBMS

Eliminate Columns Not Dependent On Key The Employee Relation satisfies - First normal form - As it has no repeating groups. Second normal form - As it do not have multi-a

Strong entity set and weak entity set? Strong entity set and weak entity set: A strong entity set has a primary key. All tuples in the set are distinguishable through that key.

Hi, Do you offer private tuition for DBMS?