On 10 May 2010, at 10:50am, Andreas Henningsson wrote:

> select top 10 * from dailyRankingTable
> 
> union all
> 
> SELECT a.* FROM dailyRankingTable a, friendTable b WHERE upper(b.player)
> = upper('?') AND upper(b.friend) = upper(a.name)
> 
> Top 10 does not work for SQlite I believe. But you might can find something
> like it.

Sort in descending order of rank, and add LIMIT 10 to the end of your SELECT 
statement.  Depending on your names, it'll look something like

SELECT * FROM dailyRankingTable ORDER BY rank DESC LIMIT 10

Simon.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to