Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么有人会费心输入与别名相同的名称?
SELECT * FROM node INNER JOIN users users ON node.uid = users.uid INNER JOIN node node2 ON node.uid = node2.uid INNER JOIN mytable mytable ON node2.nid = mytable.nid
(编辑以显示一个似乎不需要别名的简单示例)
我只能认为这是因为一些自动生成的查询或不知道他们在做什么的人。
即使您稍后加入同一个表,这样做也没有任何价值,因为那时您只需要为第二个实例设置别名。