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
Consider the following frequency counts of some itemsets in a transaction database r : freq({A}, r) = 0.405 freq({B}, r) = 0.510 freq({C}, r) = 0.303 freq({A

What is RDBMS? Relational Data Base Management Systems (RDBMS) are database management systems that maintain data records and indices in tables. Relationships may be formed and

What benefits can a company gain by managing its own information infrastructure and servicea

Database Recovery And Security Introduction In this part we will introduce two main issues relating to database management systems. A computer system suffers from dissi

i am required to come up with entities relationships, optionality and cardinality from a scenario. there is a night club and bookings for a musician band

Locks: Serialisabilty is just a test whether a given interleaved schedule is ok or has a concurrency related trouble. Though, it does not make sure that the interleaved concurrent

Rules Of Data Normalisation  Let us now summarise Normalisation with the help of various clean rules. The following are the necessary rules for the Normalisation process: 1.

Describe the types of Inheritance 1.  Single inheritance 2.  Multiple inheritance 3.  Hierarchical inheritance 4.  Multilevel inheritance

Provide Examples of different types of Time and Date formats.  It's most common store dates using a dash (-) as a colon (:)and the delimiter as the time delimiter. The given fo

In E-R diagram how generalization is represented? in E-R diagram generalization is represented by Triangle shape.