On Tue, 27 Aug 2013 21:00:50 -0500
Nico Williams <n...@cryptonector.com> wrote:

> Of course, lacking a syntax for associating collations with string
> literals there will be times when some, or even all of the operands to
> an operation that needs collation information, is missing.  In such
> cases the collation information of some operands could be used to cast
> the others, or lexical clues might be needed, or a default might be
> provided.

There's no need to qualify string literals, as it turns out.  SQLite
makes a reasonable choice in that context. When comparing a string
literal to a column, the literal (in effect) takes on the collation of
the column.  

sqlite> create table t ("binary" char collate binary, "rtrim" char
collate rtrim, "nocase" char collate nocase); 
sqlite> insert into t values ('A', 'A   ', 'A'); 

sqlite> select * from t where "nocase" = 'a' and "rtrim" = 'A';
binary      rtrim       nocase    
----------  ----------  ----------
A           A           A         

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

Reply via email to