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

Explain what is rdbms, Explain what is RDBMS ? RDBMS - RDBMS is a datab...

Explain what is RDBMS ? RDBMS - RDBMS is a database management system (DBMS) which stores data within the form of relations. Relational databases are powerful since they need f

List and describe the different types of indexes, Question 1 Indexes are o...

Question 1 Indexes are ocasionally defines on a single field of a file called an indexing field. List and describe the different types of indexes Question 2 Consider a book i

Define hash files organization, Define Hash files organization a. Hashi...

Define Hash files organization a. Hashing includes computing the address of a data item by calculating a function on the search key value.   b. A hash function h is a functi

Datawarehouse, Define a job scheduling strategy that will meet business req...

Define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a pictori

Explain hierarchical model, Explain Hierarchical Model ? Hierarchical ...

Explain Hierarchical Model ? Hierarchical Model - It was established to model several kinds of hierarchical organizations which exist in the real world. It uses tree structur

Differentiate between pl/sql functions and procedures, Oracle & Distributed...

Oracle & Distributed Databases 1. Differentiate between PL/SQL functions and procedures. 2. Draw the diagram of logical structure of oracle database and explain it in brief.

Describe the types of inheritance, Describe the types of Inheritance ...

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

EER models, Ask question #MinimThe Georgia Tech Library (GTL) has approxima...

Ask question #MinimThe Georgia Tech Library (GTL) has approximately 16,000 members, 100,000 titles, and 250,000 volumes (an average of 2.5 copies per book). About 10 percent of the

By the relations get details of employees working in sql, Consider the rela...

Consider the relations: PROJECT(proj#,proj_name,chief_architect) EMPLOYEE(emp#,emp_name) ASSIGNED(proj#,emp#) Use relational algebra to express the subsequent queries: (i) Get

Describe queries with complex types, Describe queries with complex types? ...

Describe queries with complex types? The present extension of the SQL query language deal with the complex type Let us start with the simple example: Find the title and t

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