Hi Priyan,
Yes its not similar to
MYSQL GROUP_CONCAT().
Not a simple one using
SELECT Query but the other way using a PL/SQL Block we can get the same result as per the
MYSQL GROUP_CONCAT().
PHP Code:
SET SERVEROUTPUT ON;
DECLARE
vName VARCHAR(100);
BEGIN
FOR I IN(SELECT ENAME FROM EMP)
LOOP
IF(vName IS NULL)THEN
vName := I.ENAME;
ELSE
vName := CONCAT(CONCAT(vName,','),I.ENAME);
END IF;
END LOOP;
DBMS_OUTPUT.PUT_LINE('The Names From Emp Table:'||vName);
END;
HTML Code:
Output:
The Names From Emp Table: John,Raj,Selvam,Smith,Kumar.
PL/SQL procedure successfully completed.