Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.oracle    |    Overblown overpriced overengineered SHIT    |    2,288 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,739 of 2,288    |
|    rob to All    |
|    Re: Creating a table in Oracle DB if it     |
|    13 Sep 04 17:12:56    |
   
   From: rob@dsdelft.nl   
      
   > If someone can take time to write a running sample and send me, I   
   > would be Grateful.   
   >   
   > Thanks,   
   > Chaitanya.   
      
   Something like this?   
   === create_test123.sql ===   
   DECLARE   
    c_table_name varchar2(50) := upper('test123');   
    cursor c1 is   
    select table_name   
    from user_tables   
    where table_name = c_table_name;   
   BEGIN   
    open c1;   
    fetch c1 into v_table_name;   
    if c1%NOTFOUND   
    then   
    execute immediate 'create table test123 (n number   
    ,b varchar2(20)) ' ;   
    end if;   
    close c1;   
   END;   
   /   
      
   === end create_test123.sql ===   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca