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
It can be easily defined as: The database must not have any unmatched foreign key values. The term "unmatched foreign key value" means a foreign key value for which there doe

A file manipulation command that extracts some of the records from a file is called ? A file manipulation command that extracts some of the records from a file is called SELECT

Define the concept of Object Diagram An object diagram shows a set of the objects and their relationships with each other at a point of time. In a static view, object diagram

Create Student DB and perform delete operation? STUDENT (name, student#, class, major) COURSE (course name, course#, credit hours, department) SECTION (section identifier, co

A super key is an attribute or set of attributes used to recognize the records uniquely in a relation. For instance, in the Relation PERSON defines earlier PERSON_ID is a super

Need a sample of a clinic database relationships

What are called journaling file systems? File systems that support log disks are known as journaling file systems.

Load sample data into the database tables design and test queries to return the following information • All rows and columns for employees • All rows and columns for customers •

Which operation is used if we are interested in only certain columns of a table? PROJECTION operation is used if we are interested in only certain columns of a table.

Assume that you are responsible for selecting a new DBMS product for Sohar Hospital