This should really be allowed - I do not understand why it is not.
SELECT *
FROM (
SELECT *
FROM MyTable
)
In SQL Server it is allowed, but the inner select has to be given a name, such as:
SELECT *
FROM (
SELECT *
FROM MyTable
) m
When a name is not supplied it will throw an incorrect syntax error near ')' message.
If you add a table alias it should work:
SELECT *
FROM (
SELECT *
FROM MyTable
) as A
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With