Reputation: 44051
I have a working query as follows
SELECT r.realname contractor_name, u.uid contractor_uid, ...
How can I select just contractor_uid from this result? I have tried
select contractor_uid from (SELECT r.realname contractor_name, u.uid contractor_uid...)
But I get the error message
Every derived table must have its own alias
Upvotes: 0
Views: 41
Reputation: 50044
Add a dummy name after the sub query, i.e.:
select contractor_uid from (SELECT r.realname contractor_name, u.uid contractor_uid...) t;
Upvotes: 3