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

Equi join-table handling, Equi Join: A join in which the joining condition...

Equi Join: A join in which the joining condition is based on equality among values in the common columns. Common columns show (redundantly) in the result table. Let us Consider th

What is the highest normal form of the table - normalization, In problems 1...

In problems 1 - 4, you are given the columns of a table, and a set of functional dependencies.  Determine the normal form of this table.  Remember that the normal form is the HIGHE

Explain relational model and their use in dbms, Explain Relational model an...

Explain Relational model and their use in DBMS? Relational Model - The relational model was first introduced through E.F. Codd of the IBM Research in the year of 1970. The mode

Pl/SQL, I need solution of the question posted at http://www.expertsmind.c...

I need solution of the question posted at http://www.expertsmind.com/questions/sql-query-for-testing-triggers-and-stored-procedures-30140149.aspx

Data base model, why are older data base model are being replaced by new da...

why are older data base model are being replaced by new data model

Differentiate between key and superkey, Differentiate between Key and super...

Differentiate between Key and superkey? Key and superkey - A key a single attribute or a combination of two or more attributes of an entity set in which is used to identify o

What are called index-sequential files, What are called index-sequential fi...

What are called index-sequential files? The files that are ordered sequentially with a primary index on the search key are known as index-sequential files

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