- declare
- cursor c is
- select a.COLUMN_NAME||' ' from user_tab_columns a
- where a.TABLE_NAME = 'SYS_TABLE';
- col user_tab_columns.COLUMN_NAME%type;
- cols varchar2(4000);
- begin
- open c;
- loop
- fetch c into col;
- exit when c%notfound;
- cols := cols || col;
- end loop;
- close c;
- dbms_output.put_line(cols);
- end;
- --该片段来自于http://www.codesnippet.cn/detail/131120137141.html
来源: http://www.codesnippet.cn/detail/131120137141.html