I have 2 tables, advertisers and campaigns. Both have more fields I care to list and both have a primary key "id". I'd like to create a view without having to enter all fields manually using * instead. I keep getting the "duplicate column" error. Is it possible to do this via * at all or is my only option to enter all column names and setting aliases for the IDs?
CREATE VIEW VIEW_CAMPAIGNS AS
SELECT *,
advertisers.id as adv_id,
campaigns.id as camp_id
FROM campaigns, advertisers
WHERE advertisers.id = advertiser_id
Still returns #1060 - Duplicate column name 'id'