Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle insert or update

-- Oracle: Example for Insert or update in t1 from t2 values 
MERGE INTO table1 t1
USING table2 t2
ON (t1.CODE = t2.ID)
WHEN MATCHED THEN
    UPDATE SET t1.COL1 = t2.VALUE1
WHEN NOT MATCHED THEN
    INSERT (CODE, COL1)  VALUES (t2.ID, t2.VALUE1);
Comment

PREVIOUS NEXT
Code Example
Sql :: change database name psql 8 
Sql :: convert sql to relational algebra 
Sql :: update with inner join postgres 
Sql :: truncate function in sql oracle 
Sql :: postgres cast as currency format 
Sql :: is not numeric sql 
Sql :: mysql separator 
Sql :: update from table tsql 
Sql :: sqlalchemy join on column 
Sql :: mysql where value is null 
Sql :: sql_calc_found_rows 
Sql :: how to change a column name in postgresql 
Sql :: ms sql create user 
Sql :: pad zero sql server 
Sql :: syntaxerror unexpected identifier mysql 
Sql :: select first and last row sql 
Sql :: mysql get last insert id 
Sql :: oracle pagination query offset 
Sql :: group_concat in mysql 
Sql :: import mysql dump command line 
Sql :: postgre describe table 
Sql :: foreign key constraint in ms sql 
Sql :: oracle list grants on procedure 
Sql :: rename table sql server 
Sql :: how to insert multiple rows in sql 
Sql :: rename table name 
Sql :: json extract 
Sql :: mysql grant all on all databases 
Sql :: xampp mysql version 
Sql :: create table in mysql mariadb primary key foreign key 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =