I am having a table with data stored in row basis as shown below.

```
UID | DetailsID | Data|
----------------------|
 1  |     1     |  A  |
 1  |     2     |  200|
 1  |     3     |  2010-10-11 08:32 |
 2  |     1     |  B  |
 2  |     2     |  600|
 2  |     3     |  2011-05-20 14:56 |

```

From this I need the output as follows

```
UID|1|2|3
------------
1|A|200|2010-10-11 08:32
2|B|600|2011-05-20 14:56

```

Here main thing is, the number of entries of DetailsID values is not known.

I wanted this one in MySQL.

Please help me out of this.