I'm new to StackOverflow and this is my first post.
Here is what I want to achieve, I want to print all the names where id = 1 in a single row
Here is a result I want to achieve for Id = 1 query
Id Names 1 Tom Smith, Paul Walker, Peter Robin
Here is the sample table
CREATE TABLE myData(
ID INT NOT null,
FirstName NVARCHAR(20),
LastName NVARCHAR(20)
)
INSERT INTO myData
VALUES(1,'Tom','Smith')
INSERT INTO myData
VALUES(2,'Jared','Williams')
INSERT INTO myData
VALUES(1,'Paul','Walker')
INSERT INTO myData
VALUES(4,'Mary','Elisabeth')
INSERT INTO myData
VALUES(1,'Peter','Robin')
INSERT INTO myData
VALUES(2,'Chen','Leo')