PL/SQL (MOSC)

MOSC Banner

Greatest function in sql

edited Oct 7, 2015 8:43PM in PL/SQL (MOSC) 6 commentsAnswered ✓

Suppose a.last_update_date=  10/1/2015, a.last_updated_by=1

b.last_update_date= 10/3/2015, b.last_updated_by=3

c.last_update_date= 10/2/2015, c.last_updated_by=2

d.last_update_date= 10/4/2015, d.last_updated_by=4

Select greatest(a.last_update_date,b.last_update_date,c.last_update_date,d.last_update_date) from a,b,c,d; 

o/p: 10/4/2015


How do i get the last_updated_by of the above greatest(a.last_update_date,b.last_update_date,c.last_update_date,d.last_update_date)???

i.e 2???





Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center