DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Skewed columns

Threaded View

  1. #4
    Join Date
    Apr 2001
    Location
    Bangalore, India
    Posts
    727
    Code:
    SQL> create table emp (ename varchar2(50), esex varchar2(10));
    
    Table created.
    
    SQL> insert into emp select object_name,'Male' from dba_objects;
    
    9369 rows created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> insert into emp select object_name,'Female' from dba_objects where rownum < 20;
    
    19 rows created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> select esex,count(*) from emp
      2  group by esex;
    
    ESEX         COUNT(*)
    ---------- ----------
    Female             19
    Male             9369
    Thats it.
    Last edited by Thomasps; 05-15-2006 at 03:15 AM.
    Thomas Saviour([email protected])
    Technical Lead (Databases)
    Thomson Reuters (Markets)

    http://ora600tom.wordpress.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width