Search Posts

Author: Mano

Need to string comparision in MYSQL

how to – Need to string comparision in MYSQL I have two varchar variables. DECLARE val1 VARCHAR(100) DEFAULT ‘1,2,3’; DECLARE val2 VARCHAR(100) DEFAULT ‘1,2’; DECLARE result VARCHAR(100) ; SET result= val1 compare val2; Expectation: result=’3′ My expectation is possible in MYSQL,If yes please guide me Source: Stackoverflow