oracle sqlplus 格式化输出的命令

发表于:2007-07-02来源:作者:点击数: 标签:
SQL select * from aa; BB CC ---------- ---------- 1 999999.99 SQL col bb format @#99.9@#;SQL select * from aa; BB CC----- ---------- 1.0 999999.99 SQL col bb head @#99.9@#;SQL select * from aa; 99.9 CC----- ---------- 1.0 999999.99 SQL col

SQL> select * from aa;

        BB         CC---------- ----------         1  999999.99

SQL> col bb format @#99.9@#;SQL> select * from aa;

   BB         CC----- ----------  1.0  999999.99

SQL> col bb head @#99.9@#;SQL> select * from aa;

 99.9         CC----- ----------  1.0  999999.99

SQL> col bb head @#学号@#;SQL> select * from aa;

 学号         CC----- ----------  1.0  999999.99

SQL> col bb format @#99@#;SQL> select * from aa;

学号         CC---- ----------   1  999999.99

SQL> col bb head @#学|号@#;SQL> select * from aa;

 学 号         CC--- ----------  1  999999.99

SQL> select count(bb),sum(clearcase/" target="_blank" >cc) from aa;

 COUNT(BB)    SUM(CC)---------- ----------      8192 8191999918

SQL> col sum(cc) format @#9999999999.99@#;SQL> select count(bb),sum(cc) from aa;

 COUNT(BB)        SUM(CC)---------- --------------      8192  8191999918.08

SQL> col sum(cc) format @#9999999999.99@# head @#总分@#;SQL> col count(bb) format @#999999@# head @#人数@#;SQL> select count(bb),sum(cc) from aa;

   人数           总分------- --------------   8192  8191999918.08

原文转自:http://www.ltesting.net