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

What you understand by client-server environment, Problem: a) Briefly d...

Problem: a) Briefly describe what you understand by Client-Server environment b) The File Server is a simple form of Client-Server. Describe the principles of the File Serve

Create a entity-relationship diagrams, This project requires you to create ...

This project requires you to create a database design.  Your design will be documented in a set of Entity-Relationship diagrams.  Draw a set of Entity-Relationship diagrams to mode

Define decision tree classifiers, Define decision tree classifiers? As ...

Define decision tree classifiers? As the name suggests decision tree classifiers use a tree: Every leaf node has an associated class, and every internal node has a predicate as

What is a block and a block number, What is a block and a block number? ...

What is a block and a block number? A block is a contiguous sequence of sectors from a single track of one platter. Every request specifies the address on the disk to be refere

What is vertical fragmentation, What is vertical fragmentation? Vertica...

What is vertical fragmentation? Vertical fragmentation divides the relation by decomposing the scheme R of relation r.

What is data mining?, Question 1 Define OLTP? Explain the Differences betw...

Question 1 Define OLTP? Explain the Differences between OLTP and Data Warehouse Question 2 What is Architecture? Explain various components involved in it Question

Having clause with sub queries, Having Clause with sub queries: First we h...

Having Clause with sub queries: First we have to recollect the GROUP BYclause. The following query searches the minimum salary in every department. SELECT DEPTNO, MIN (SAL)

#normalisation.., define normalisation and functional dependency

define normalisation and functional dependency

Coursework, ERD Diagram of Medical Recruitment Agency?

ERD Diagram of Medical Recruitment Agency?

Entity identifier key attributes, An entity type usually has an attribute w...

An entity type usually has an attribute whose values are distinct for every individual entity in the collection. Such an attribute is known as a key attribute and its values can be

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