alias - SQL-Duplicate column names -
i using sql developer , trying outer join on 2 tables. error showing "duplicate column names". have used table nameswhile comparison still giving error. code following:
create view oecd_view select * dm_oecd_gdp full outer join dm_oecd_doctors on dm_oecd_gdp.data_year = dm_oecd_doctors.data_year;
i have heard error can resolved aliasing don't know how alias while comparing. can done?
thanks
you have explicitly name returned fields both tables , alias fields having same name, like:
create view oecd_view select dm_oecd_gdp.data_year gdp_data_year, dm_oecd_doctors.data_year doc_data_year, ... rest of fields here dm_oecd_gdp full outer join dm_oecd_doctors on dm_oecd_gdp.data_year = dm_oecd_doctors.data_year;
Comments
Post a Comment