On 19 Aug 2017, at 10:48pm, Cecil Westerhof <cldwester...@gmail.com> wrote:

> I was also told that you never should put a sort on a view. Is that true,
> or a bit to strong?

Generally, you put the ORDER BY on the SELECT you’re using the consult the 
VIEW.  Technically speaking a VIEW is just a set of records and the ORDER BY 
should be a last-minute thing just before presentation of the results.

But it can be useful for someone submitting commands manually to create a VIEW 
with ORDER BY.  For instance, using the command-line shell to investigate weird 
results, or for those cases where you’re using SQLite like a spreadsheet to 
arrive at a one-off result.  So I think an outright ban is a little strong.

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

Reply via email to