Apparently document writer assumed that it's pretty obvious how CASE works because it works the same way in all DBMSes. :) You can read any documentation Google gives, e.g. this: http://msdn.microsoft.com/en-us/library/ms181765.aspx.
In brief, when you give optional expression then CASE works like 'switch ... case ... case ... default' construction in C, when optional expression is not given it works like series of 'if ... else if ... else' constructions in C. Pavel On Tue, Dec 8, 2009 at 5:23 PM, Simon Slavin <slav...@bigfraud.org> wrote: > My Google-fu appears to be weak. SQLite apparently supports a CASE ... WHEN > construction. Where on www.sqlite.org is the meaning defined ? I can see > CASE mentioned in diagrams on > > http://www.sqlite.org/lang_expr.html > http://www.sqlite.org/syntaxdiagrams.html > > but I don't understand the use of the optional expression immediately after > the CASE token. > > Simon. > _______________________________________________ > 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