Without the continuous bitter cold, there can be no fragrant plum blossom
访问量(1566919) 积分(1957) 等级(核心会员) 排名(4)
一直以来,觉得MySQL中使用/G参数改变输出结果集的显示方式非常好用,尤其是在命令行界面。但是ORACLE数据库没有这个功能,今天在搜索到Tom大师的一篇博文时,发现大师用一个存储过程print_table实现了类似这样的功能。只是我们这些凡夫俗子不知道而已,特意整理在此,方便自己或有需要的人以后查看。 CREATE OR REPLACE PROCEDURE print_table(...
2018-10-25 14:11 1891 1
--插入数据: declare --定义cursor把数据全部读入内存中 cursor cur is select t.pk_account_detail_id from Ecm_Member_Account_Details t; --自定义集合类型 type rec is table of cur%rowtype; recs rec; begin open cur; while (true) loop fetch cur bulk collect into recs limit 10000;--10000行...
2016-09-02 11:47 2682 0
如下所示,前面少个0 SQL>select money from users where username ='LEI'; money --------- .3256 解决方法: SQL>select to_char(money ,'fm9999999990.00') from users where username ='LEI'; money --------- 0.3256
2016-09-02 11:27 2173 0