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.
我对 SQL 很陌生,我只是想弄清楚当你使用 t1、t2 或 t3 等时它意味着什么……我无法理解它,只想了解它。我试过在谷歌上找遍,但我什么也没找到……你能帮忙吗?
谢谢 MW
t1/t2/t3 是“临时”表的常见表别名(例如,由多个表组成的子查询并且别名不好)....如果有帮助的话,称它为有点懒惰:)
SELECT * FROM MyTable t1意味着从现在开始,我将调用 MyTable t1。 另一种写法是:SELECT t1.* FROM MyTable t1或者如果你没有使用别名,SELECT MyTable.* FROM MyTable
SELECT * FROM MyTable t1
SELECT t1.* FROM MyTable t1
SELECT MyTable.* FROM MyTable