Bin Chen wrote:
> My contacts contain a lot of duplicated records, I want to use the
> traditional SQL clause "UNIQUE" to get the unique records, is it
> doable thru the query() method call? Thanks. I tried with the
> selectionArgs argument but failed.

I am not aware of a UNIQUE clause in queries in SQL. There is DISTINCT
to get the unique records, and MySQL has a UNIQUE constraint in CREATE
TABLE and ALTER TABLE.

Regardless, you may want to try rawQuery() instead of query() -- I tend
to use that for things that are outside the ordinary.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books.html

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to