Here's the info source on LAST() function:

http://www.w3schools.com/sql/sql_func_last.asp



I needed to retrieve the last row from a table.
And the example (the workaround tip) in the above link solved my issue.




________________________________
From: Puneet Kishor <punk.k...@gmail.com>
To: General Discussion of SQLite Database <sqlite-users@sqlite.org>
Sent: Sat, January 29, 2011 10:47:44 PM
Subject: Re: [sqlite] LAST() function not supported




On Saturday, January 29, 2011 at 2:38 PM, Marian Cascaval wrote:

> Hi!
> 
> Is LAST() function going to be supported?
> 
> Or will the "SELECT ... FROM ... ORDER BY ... DESC LIMIT 1" workaround always 
>be 
>
> enough?
> 
> 
> 
> 


Where did you get information on this "LAST()" function?


> My concern is if there might be any speed improvement if LAST() function were 
>to 
>
> be implemented, comparing to the workaround.
> 
> 
> 
> 
> 
You are possibly confusing how a function works vs. the SQL syntax. A function 
acts on a column or an expression for every row in the result set. It doesn't 
modify the number of rows in a result set. On the other hand, the LIMIT clause 
does nothing to the entries that have been retrieved. Instead, it throttles the 
size of the result set, that is, it controls the number of rows in the result 
set.




-- 
Puneet Kishor
Sent with Sparrow 




_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



      
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to