I have three tables in SQL, and I need them to be combined into one. I need all fields from all tables in one table. All tables contain the same fields from only three different years. I wrote code that:
CREATE TABLE COL_TBL_TRAINING_ALL_YEARS AS( SELECT COL_TBL_2010_TRN_RESULTS_new.*, COL_TBL_TRN_RESULTS_GEMS_2011.*, COL_TBL_TRN_RESULTS_GEMS_2012.* FROM COL_TBL_2010_TRN_RESULTS_new, COL_TBL_TRN_RESULTS_GEMS_2011, COL_TBL_TRN_RESULTS_GEMS_2012 WHERE COL_TBL_2010_TRN_RESULTS_new.SYS_EMP_ID_NR = COL_TBL_TRN_RESULTS_GEMS_2011.SYS_EMP_ID_NR = COL_TBL_TRN_RESULTS_GEMS_2012.SYS_EMP_ID_NR)
And I get the wrong syntax next to the error word "AS" and the wrong syntax next to "="
I read my books on SQL and it seems I can not find an explanation on the method for this, any help would be greatly appreciated.
source share