首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

PL/SQL 输出有关问题

2012-04-07 
PL/SQL 输出问题cursor mycursor1(code1 char) isselect * from productwhere code code1dbms_output.p

PL/SQL 输出问题
cursor mycursor1(code1 char) is
  select * from product
  where code < code1;
 dbms_output.put_line('code: '||cursor1.code||' name: '||cursor1.name);

在不知道表中字段名的情况下,如果我想输出product表中所有字段的值,
而不是cursor1.code,cursor1.name这样一个一个输出,应该怎么写呢?
请高手赐教,非常感谢!

[解决办法]
这只能在PL/SQL中采用动态SQL来实现,仅使用SQL语句是无法实现的。

热点排行