Each derived table (also called a subquery) does have to have an alias. ie. Each query within parentheses must specify an alias (ASwhat) that can be used to reference it in the rest of the outer query.
SELECT ID FROM (
SELECT ID, msisdn FROM (
SELECT * FROM TT2
) AS T
) AS T
Of course, in your case the entire query can be replaced with:
I think it requires you to do this:
But why are you writing this query in the first place?
Each derived table (also called a subquery) does have to have an alias. ie. Each query within parentheses must specify an alias (
ASwhat
) that can be used to reference it in the rest of the outer query.Of course, in your case the entire query can be replaced with: