General rules for simplifying SQL statements

前端 未结 8 1531
心在旅途
心在旅途 2020-12-22 17:15

I\'m looking for some \"inference rules\" (similar to set operation rules or logic rules) which I can use to reduce a SQL query in complexity or size. Does there exist some

8条回答
  •  -上瘾入骨i
    2020-12-22 17:56

    I like everyone on a team to follow a set of standards to make code readable, maintainable, understandable, washable, etc.. :)

    • everyone uses the same alias
    • no cursors. no loops
    • why even think of IN when you can EXISTS
    • INDENT
    • Consistency in coding style

    there is some more stuff here What are some of your most useful database standards?

提交回复
热议问题