Question: I have a table that looks like -

```
|--|----|------|------|
|id|name|phone1|phone2|
|--|----|------|------|
|1 |abc |123   |567   |
|2 |xyz |766   |980   |
|--|----|------|------|

```

I need to write a query that can give me output like -

```
|--|----|-----|
|id|name|phone|
|--|----|-----|
|1 |abc |123  |
|1 |abc |567  |
|2 |xyz |766  |
|2 |xyz |980  |
|--|----|-----|

```

Basically I am creating 1 column out of 2 phone number columns and repeating the rows. Can someone please help me with query?

Answer: 
You can use simply:

```
Select id, name, phone1 as phone
from tbl
Union all
Select id, name, phone2 as phone
from tbl

```
you can achieve this by simply using `UNION ALL` of same table .

```
SELECT id
    ,name
    ,phone1 AS phone
FROM your_Table

UNION ALL

SELECT id
    ,name
    ,phone2 AS phone
FROM your_Table

```