Transpose table with columns (sql) -


i have table t1 2 columns c1 (int) , c2 (nvarchar). in table 1 row. example, query select c1,c2 t1 returns result set:

c1   c2 ---- ---- 1    

and need transpose table columns, excpect result:

col name  value --------  ----- c1        1 c2        

i have idea, how write query. hope can me.

this should work databases:

select 'c1' colname,         c1  colvalue table  union  select 'c2',         c2 table 

Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -