On 1 Jul 2011, at 3:07pm, Alessandro Marzocchi wrote:

> 2011/7/1 Simon Slavin <slav...@bigfraud.org>
> 
>> On 1 Jul 2011, at 11:20am, Alessandro Marzocchi wrote:
>> 
>>> Isn't it possible to use a view for that?
>> 
>> You can use a VIEW if you want, but VIEWs don't sort the table either.  A
>> VIEW is just a way of saving a SELECT query.  When you consult the VIEW
>> SQLite executes the SELECT.
> 
> Putting the 'ORDER BY' clause in view won't work?

It will work just fine, in that the results you see will appear in the ORDER 
you asked for.

However, it has no influence on how data is stored.  In fact no table data is 
stored for a VIEW at all.  The thing stored is the parameters given when you 
created the VIEW.  Every time you refer to a VIEW in a SQL statement SQL goes 
back and looks at the VIEW specification again.

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

Reply via email to