Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: query on last inserted record.....please help
I am guessing that addressuid is shared by all the patient addresses so
unless there is a column in the address table that has the effect of
ordering the data timewise as Michel suggested then a table change is
required. I would expect that the address table has an entry date
associated with each address. Selecting max(entry_date) from address
where b.addressuid = a.addressuid would work in this case as would a
sequence number value that might have been added to give the table a
PK.