📜  每个 Derived yable 必须有自己的别名 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:04:58.279000             🧑  作者: Mango

代码示例1
/*Every derived table (AKA sub-query) must indeed have an alias. 
I.e. each query in brackets must be given an alias (AS whatever), 
which can the be used to refer to it in the rest of the outer query.
*/
SELECT ID FROM (
    SELECT ID, msisdn FROM (
        SELECT * FROM TT2
    ) AS T
) AS T