Weather Observation Station 3

  • + 2 comments

    Hi everyone I just have a doubt kindly clarify it will be of great help Why dose below query gives me an error SQL0104N An unexpected token "%" was found following "ROM STATION WHERE ID". Expected tokens may include: "CONCAT". SQLSTATE=42601

    SELECT DISTINCT CITY FROM STATIONS WHERE ID%2=0
    

    Meanwhile if I relace ID%2=0 by MOD(ID,2)=0 it gives me correct solution

    SELECT DISTINCT CITY FROM STATIONS WHERE MOD(ID,2)=0;