clear markdown feedback
clear markdown feedback
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 3364508 fiddles created (36247 in the last week).

CREATE TABLE LIST (FirstName varchar2(4), LastName varchar2(4)) ;
 hidden batch(es)


INSERT ALL INTO LIST (FirstName, LastName) VALUES ('Ken', 'Chan') INTO LIST (FirstName, LastName) VALUES ('John', 'Ng') INTO LIST (FirstName,LastName) VALUES ('Joe', 'Lam') INTO LIST (LastName) VALUES ('Lam') INTO LIST (FirstName) VALUES ('Joe') SELECT * FROM dual ;
5 rows affected
 hidden batch(es)


SELECT LastName || (CASE WHEN LastName IS NOT NULL AND FirstName IS NOT NULL THEN ',' END) || FirstName as FullName FROM LIST;
FULLNAME
Chan,Ken
Ng,John
Lam,Joe
Lam
Joe
 hidden batch(es)