PL/SQL Update one table from another



select * from personel;

create table personel_yeni
(
 PERSONEL_ID   NUMBER(10,0) NOT NULL ENABLE,
 PERSONEL_NAME VARCHAR2(20 BYTE),
 OFFICE_ID     NUMBER(10,0)
);

select * from personel_yeni;

insert into personel_yeni
values
(
  19,
  'Some data',
  9
);

update personel_yeni y set
  personel_name=
  (
    select personel_name
    from personel e
    where e.personel_id=y.personel_id
  ),
  office_id=
  (
    select office_id
    from personel e
    where e.personel_id=y.personel_id
  );

Comments

Popular posts from this blog

Solution for "Can not obtain Oracle client information from registry"

Solution for the fault: "System.Diagnostics.Process.Start is not working on IIS, but working on ASP.NET Development Server"

Getting Umbraco Content - IPublishedContent vs IContent vs Node vs Document