Ceppek's

Adventures,friends,love,life,art, IT geeks, photography

SQL: mencari record yang double di database

Leave a comment


Bagi pengguna database atau programmer, kadang kita di pusingkan data2 yang double di database kita,

Kalau datanya cuman 10 record sih tidak masalah, bagaimana kalau data anda mencapai ribuan, ratusan ribu? Atau bahkan jutaan.

Tentu akan sangat merepotkan bukan?

Ok, kira2 syntax sqlnya akan seperti ini:

Select kolom1,kolom2,count(*)

From table1 group by kolom1,kolom2

Having count(*) >1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s