我要从user_tab_columns表中查询出一个表的结构,想让行变成列,可以用一个SQL语句实现吗,而不是过程或函数
假如select * from user_tab_columns where table_name='aa'
我想得出aa的表字段名及字段类型。
假如select * from user_tab_columns where table_name='aa'
我想得出aa的表字段名及字段类型。
调试欢乐多
,max (decode(km,'chinese',cj)) as chinese
,max(decode(km,'math',cj)) as math
,max(decode(km,'english',cj)) as english
from test
group by name;大概是这个思想 你给个具体的表说说吧