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,004 of 2,288    |
|    Ana C. Dent to Raj Kotaru    |
|    Re: Inserting multiple rows in sqlplus    |
|    22 Jan 04 18:22:01    |
   
   From: anacedent@hotmail.com   
      
   Raj Kotaru wrote:   
   > Hi,   
   >   
   > In sqlplus, I can insert a single row using:   
   >   
   > insert into employee   
   > (name, salary, hiredate)   
   > values   
   > ('xyz', '86378', sysdate);   
   >   
   > Is there a modification of the insert command that will allow me to   
   > insert more than one row into a table without having to resort to   
   > multiple "insert into ..." statements?   
   >   
   > For example, can I insert two rows via something that lloks like:   
   >   
   > insert into employee   
   > (name, salary, hiredate)   
   > values   
   > {   
   > ('xyz', '86378', sysdate),   
   > ('abc', '84249', sysdate-1)   
   > };   
   >   
   > Here I am assuming that { } encloses all valid rows, with () enclosing   
   > a single row within the surrounding {}.   
   >   
   >   
   > I do not want to use the sql loader, PL-SQL, or SQL-PLUS constructs   
   > like functions, scripts, and stored procedures.   
   >   
   > Thanks   
   > Raj   
      
   INSERT INTO EMPLOYEE AS   
    SELECT A.NAME, B.SALARY, C.HIREDATE   
    FROM NAME_TABLE A, SALARY_TABLE B, HIREDATE_TABLE C   
    WHERE A.SSN = B.SSN   
    AND A.SSN = C.SSN;   
      
   --- 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