tags:

views:

24

answers:

1

HOw to use DISTICT in select Quoery in SQLITE for iphone.?

is DISTINCT is supported in iPhone ?

A: 

It appears to be - but might depend on exactly what you're trying to do, and perhaps how.

The DISTINCT keyword causes a subset of result rows to be returned, in which each result row is different. NULL values are not treated as distinct from each other. The default behavior is that all result rows be returned, which can be made explicit with the keyword ALL.

Typically, to adapt an existing query to return a distinct set of rows you would just add the distinct keyword after select:

SELECT DISTINCT
    ...
FROM
    ...
martin clayton
Select DISTINCT (a),b,c from Table ; This will return distinct values in a field only right?? WHat if i want all feild should b empty. and query like Select DISTINCT(*) from Table ????/
shishir.bobby
@shishir - I'm not sure I follow the example there. I don't think sqllite is generally different to other rdbms in this respect. SELECT DISTINCT * is certainly allowed.
martin clayton