Multiple column queries-syntax, Database Management System

Assignment Help:

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


Related Discussions:- Multiple column queries-syntax

Managing databases, 10A.53 Code an Oracle Database trigger to enforce the...

10A.53 Code an Oracle Database trigger to enforce the constraint that an employee can never change his or her department. 10A.54 Code an Oracle Database trigger to allow the

What are the problems in database normalization, What are the problems if o...

What are the problems if one were not to normalize?  When do these problems surface?           Ans:  Database normalization, sometimes considered to as  canonical synthesis, is

What is data block, What is data block? Data Block - In oracle the data...

What is data block? Data Block - In oracle the data blocks are referred to as tablespaces. A tablespace is an fields of disk consisting of one or more disk files. A tablespace

Sql iis setup and admin - maybe tfs, I want a good Microsoft Admin experien...

I want a good Microsoft Admin experienced in IIS and SQL Server. They require being able to set it up and administer from then onwards. Experience in Team Foundation Server a

What is an index as defined in oracle, Normal 0 false false ...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Answer, what is database management system? & why it is required?

what is database management system? & why it is required?

Critically evaluate the bulleted list of information, Critically evaluate t...

Critically evaluate the bulleted list of information-related items in this case study. How are each contradictory to the notion of being an information-literate knowledge worker?

Physical location of record is determined by which formula, The physical lo...

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

Order by clause-data manipulation language, Order by clause By usin...

Order by clause By using this rows can be sorted It is used in the last portion of select statement By default it gets ascending order DESC: is used

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd