How to Distinct one column from all the column that i choose in Sqlite?
Thanks for helping
If you're only selecting one column, it's easy:
SELECT DISTINCT col1 FROM table
If you mean you're selecting multiple columns, but only one want one of them to be distinct you can do:
SELECT col1 , col2 , col3 FROM table GROUP BY col1
Obviously you need to be careful about whether this means you're going to miss some data from col2 and col3 that you need. Sometimes it's better to select more and filter client-side instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With