Where 是一个约束声明,使用Where约束来自数据库的数据,Where是在结果返回之前起作用的,Where中不能使用...
WHEN condition_n THEN statements_n [ ELSE else_statements ] END CASE;] Code language: PostgreSQL SQL dialect and PL/pgSQL (pgsql) The searched CASE statement follows the rules below: The conditions in the WHEN clauses are evaluated in order, from top to bottom. The sequence of statements...
But now we have another problem: theusernamecolumn is still case-sensitive. This means that yourWHEREclause will differentiate uppercase/lowercase characters. SELECT*FROMusersWHEREusername='john';-- ---+--- name | username-- ---+--- John Doe | john-- ---+--- (1 row)SELECT*FROMusers...