Mendapatkan Key/ID dari hasil query MAX MySQL   1 comment

Contoh kasus :

Result yang di-inginkan yaitu mendapatkan ATS_ID, Nilai Maximum dari SEQ_424 berdasarkan ATS_IDENT :

SQL Syntax-nya :

SELECT B.ATS_ID, B.SEQ_424, B.ATS_IDENT

FROM ats B , (

select MAX(ats.SEQ_424) AS SEQ_424, ats.ATS_IDENT from ats group by ats.ATS_IDENT

) C

WHERE B.ATS_IDENT = C.ATS_IDENT AND B.SEQ_424 = C.SEQ_424

Posted 9 Desember 2011 by Tulus Budi in SQL

Tagged with , ,

One response to “Mendapatkan Key/ID dari hasil query MAX MySQL

Subscribe to comments with RSS.

  1. follow blog’ku ya, ntar pasti aku follback http://andiweb3.wordpress.com

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: