Register now or log in to join your professional community.
In oracle we do it like this
select field1 || field2 || field3 as result from tablename;
Ex : select ' current time is '|| sysdate from dual ;
u can use this sytanx in concatenation fieds
Use AS
Select Field1,Field2,Field3 As filedMerge
Use a function with COALESCE.
CREATE FUNCTION [GetFieldsWithID]( @id int)RETURNS varchar(max)ASBEGIN declare @output varchar(max) select @output = COALESCE(@output + ', ', '') + alias from Users where id = @id return @outputENDGOSELECT [id], GetFieldsWithID([id])FROM UsersGO