Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2002
    Location
    Norway
    Posts
    13

    Unanswered: How do I multirow insert in Firebird?

    I would like to find a way to do a multirow insert in Firebird similar to the examples below ... if possible.
    Note that I need it to work with constant values and not values selected from a(nother) table (ref examples below).

    Anyone?

    In MySQL and DB2 I can do this:
    insert into pager (PAG_ID,PAG_PARENT,PAG_NAME,PAG_ACTIVE)
    values (8000,0,'Multi 8000',1),(8001,0,'Multi 8001',1)

    In Oracle I can do this:
    insert into pager (PAG_ID,PAG_PARENT,PAG_NAME,PAG_ACTIVE)
    select 8000,0,'Multi 8000',1 from dual
    union all select 8001,0,'Multi 8001',1 from dual

    In MSSQL, PostgreSQL, and SQLite I can do this:
    insert into pager (PAG_ID,PAG_PARENT,PAG_NAME,PAG_ACTIVE)
    select 8000,0,'Multi 8000',1 union all select 8001,0,'Multi 8001',1
    Tore

  2. #2
    Join Date
    May 2006
    Posts
    2
    INSERT INTO pager (PAG_ID,PAG_PARENT,PAG_NAME,PAG_ACTIVE)
    SELECT 8000,0,'Multi 8000',1 FROM RDB$DATABASE
    UNION ALL SELECT 8001,0,'Multi 8001',1 FROM RDB$DATABASE

Posting Permissions

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