I have a table that contain about 60 columns and if i write a select query in query analyser to get a row it show it and i must scroll to show data ..
How can i get one row in which it shows as 60 row, each row contain 2 columns one for column name and other for value
For example Select * from table where id = 1 in default it shown as
ID Col1 Col2 Col3 Col4 Col5 ...... Col60
1 v1 v2 v3 v4 v5 ...... v60
I want it to be shown as
ID 1
Col1 v1
Col2 v2
Col3 v3
...
Col60 v60
The below Stored Procedure do What you need
Just call it an pass table name and your condition that will return one row for example