查看表以及列: 

Select * From all_tables where  owner = 'userName'
---注意,这里需要区分大小写!

 

select * 
from user_tab_columns 
where Table_Name='表名注意大小写' 
order by column_name 
--查看当前用户下的某个表的列

select * 
from all_tab_columns 
where Table_Name='表名注意大小写' 
order by column_name 
--查看当前用户有权限看的所有的表的下的某个表的列

 打印Oracle中的数据

 

DECLARE maxvalue number DEFAULT 0;
BEGIN 
select max(C_TIMESTAMP)+2 into maxvalue from EMFUND.Tb_Queryinfo ;
dbms_output.put_line(maxvalue);
END;

 

declare
type my_emp is table of EMFUND.TB_QUERYINFO%rowtype  INDEX BY BINARY_INTEGER;
new_emp my_emp;
v_num number:=0;
cursor cur_emp is select * from EMFUND.TB_QUERYINFO Where Rownum <=10;
begin
for v_emp in cur_emp loop
v_num:=v_num+1;
select * into new_emp(v_num) from EMFUND.TB_QUERYINFO
where C_ID=v_emp.C_ID;
end loop;
for i in 1..new_emp.count loop
dbms_output.put_line(new_emp(i).C_ID);
end loop;
end; 

--bulk collect 

 

 

http://www.cnblogs.com/emanlee/archive/2011/12/02/2272629.html

相关文章:

  • 2021-08-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-27
  • 2021-07-06
  • 2021-11-23
猜你喜欢
  • 2022-02-13
  • 2021-10-02
  • 2021-11-04
  • 2021-11-22
  • 2021-11-17
  • 2021-10-02
  • 2021-08-15
相关资源
相似解决方案