oracle select query

Post on 16-Apr-2017

633 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

SELECT OPERATION

IN Oracle

Developer : Nihar R Paital

Select query retrieves information from a database and structures them into a result table.• Writing SELECT queries is a skill that you need a lot in your job.• Basically SELECT queries are difficult when there is the question of the occurrences of the following.

Using Aggregate FunctionsWithout GROUP BYWith GROUP BY

JOINSub Query

These Structures can be easily understood if you will follow the diagrammatic representation given below.

What you will get from the Diagram?

This digram gives a brief idea about How to write a query.It contains all most all keywords and clauses, which are used in SQL query, and those which are

supported in OracleYou can also collect a huge collection of syntaxes for SELECT query.

Developer : Nihar R Paital

WHERE

GROUP BY

ORDER BY

INNER JOIN

<AGG(f1)...>* <[f1], ... ><[f1], AGG(f2)>

SELECT

< [t1.][f1]...>< [t1.][f1],... AGG([t2.][f2])...>

FROM <t1>FROM <t1>, <t2>,...

<PREDICATE>

<PREDICATE on Aggregate>

DISTINCT

HAVING

ON

FROM

<table_name>...

<table_name>...

LEFT/RIGHT OUTER JOIN

<[t1.][f1]...>

JOINPREDICATE

<[t1.][f1]...>

Cross join Self

join

Developer : Nihar R Paital

top related