随笔分类 - 工作
摘要:SELECT (NULL > 1) IS NULL AS y;结果是:TRUEpostgresql 中 NULL 与值进行比较结果都是 NULL在约束check中,只有当约束中值为FALSE时出现错误,当为NULL时,该约束不会产生错误。check(id > 1)当我们的约束中的某一列为空,并与1进...
阅读全文
摘要:对dictObject list进行排序dict = [{'x': 1, 'y':3}, {'x': 2, 'y':4}]* x 的值大于2优先排* y 按照从小到大顺序排列for d in dict: d.is_x_more_than_two = True if d.x >2 else Fa...
阅读全文
摘要:column "c.id" must appear in the GROUP BY clause or be used in an aggregate function
阅读全文

浙公网安备 33010602011771号