Insert into multiple tables.

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc

Poston Fri, 29 Dec 2006 9:51 am

People need to do an insert into multiple tables, rode the same as follows:
Code: Select all
insert into pessoa pe, login_web lw, e_mail em
(pe.pes_codigo, pe.pes_cpf_cgc, lw.pes_codigo, lw.acesso, lw.senha, em.pes_codigo, em.ema_email, pe.pes_ativo. pe.cod_pessoa_jur)
values(999, 999999999, 999, teste, teste, 999,, t, 9)
when I try to run the following error occurs: unable to locate the keyword values.

I'vê looked but found nothing to help me.
Location: Barala - TT

Poston Fri, 29 Dec 2006 12:01 pm

First: * This is only allowed in ORACLE 9i banks up. (8 does not work).
* The email there have to be enclosed in single quotation marks * the syntax all wrong. See below:
Code: Select all
      INTO revenue_jan (person, revenue)
      VALUES (person, rev_jan)
      INTO revenue_feb (person, revenue)
      VALUES (person, rev_feb)
      INTO revenue_mar (person, revenue)
      VALUES (person, rev_mar)
      INTO revenue_apr (person, revenue)
      VALUES (person, rev_apr)
      INTO revenue_mai (person, revenue)
      VALUES (person, rev_mai)
      INTO revenue_jun (person, revenue)
      VALUES (person, rev_jun)
      INTO revenue_jul (person, revenue)
      VALUES (person, rev_jul)
      INTO revenue_aug (person, revenue)
      VALUES (person, rev_aug)
      INTO revenue_sep (person, revenue)
      VALUES (person, rev_sep)
      INTO revenue_oct (person, revenue)
      VALUES (person, rev_oct)
      INTO revenue_nov (person, revenue)
      VALUES (person, rev_nov)
      INTO revenue_dez (person, revenue)
      VALUES (person, rev_dez)
SELECT person,
FROM revext;
see this [url = : http//www . com/services/. akadia ora_multitable_insert . html] LINK [/url] has several examples.
Location: Portland, OR USA

Thomas F. G

Você já respondeu a dúvida de alguém hoje?

  • See also
    Last Post

Return to SQL

Who is online

Users browsing this forum: Google [Bot] and 5 guests