Question: How to change My result set in `sql server 2012`

My Result set is

```
Name   Age   Gender
 X      21     M
 Y      21     F

```

I need this type of result

```
Name|Age|Gender
X|21|M
Y|21|f

```

Including column names

Answer: 
Try this:

Press **Ctrl+T** to get this.

[![enter image description here](https://i.stack.imgur.com/LDoeA.png)](https://i.stack.imgur.com/LDoeA.png)
I presume you are trying to change the result view in SQL Server Management Studio.

If this the case what you need is 'Result to Grid' option.

You need to go to:

```
Tools --> Options --> Query Results --> General --> and chnage Default Destination for results to 'Results to grids'

```

You can also use `Ctrl + D` to change the view to grid and 'Ctrl + T' to change it back to text.

or if you want to get the result with the pipe operator in between try the below query.

```
select name +'|'+age+'|'+gender from table

```

Please check and let me know if you need anything else.