Thanks for your remark. I gave it a try on postgresql 11.5. Running different versions of my query against it gives the same result for my case:
SELECT CONCAT(username, '@', domain) FROM users WHERE ?1 LIKE mailbox; SELECT CONCAT(username, '@', domain) FROM users WHERE mailbox LIKE ?1; I'm still stuck concerning my actual problem. As far as I understand the senders table should return a list of all addresses the user may send mail from. Greetings, Michael ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ Am Montag, Oktober 14, 2019 3:13 PM schrieb Ian Darwin <[email protected]>: > There are several reasons that sqlite is called 'lite'. One is that it is > extremely light on SQL standards conformance. > It allows (I assume deliberately) many lax interpretations, in aid of getting > the job done. > > If you try this on a real SQL database like postgresql in ports, the inverted > form fails: > > website=# select * from product where 'http%' like url; > (0 rows) > > website=# select * from product where url like 'http%'; > (100 rows) > > Clearly that doesn't matter in the case where sqlite is the only possible > database, but since people may read > your post by doing a web search on 'sql like' and be deceived into thinking > you were talking about sql databases, > I wanted to not leave readers of the list with an incorrect impression. > > > Hello Giovanni, > > I just gave it a try. The order of the operands of the LIKE operator > > doesn't make any difference. I just tested it manually against my sqlite > > database. The returned results are identical. > > > > > On 10/12/19 4:46 PM, [email protected] wrote: > > > > > > > SELECT (username||'@'||domain) FROM users WHERE ? LIKE mailbox > > > > > > I think it should read > > > SELECT (username||'@'||domain) FROM users WHERE mailbox LIKE ? > > > typo or error ? > > > Giovanni
