Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql oracle update multiple rows

UPDATE employee
   SET staff_no = 
           CASE depno
                WHEN 1 THEN 'ab123'
                WHEN 2 THEN 'ab321'
                --...
                ELSE staff_no
           END
 WHERE depno IN ( 1, 2 ) -- list all cases here. use a subquery if you don't want to / cannot enumerate
Comment

oracle update multiple columns

UPDATE
    table_name
SET
    column1 = value1,
    column2 = value2,
    column3 = value3,
    ...
WHERE
    condition;
Code language: SQL (Structured Query Language) (sql)
Comment

PREVIOUS NEXT
Code Example
Sql :: select save as table postgres 
Sql :: oracle APEX elapsed time 
Sql :: mysql where sum 0 
Sql :: john the ripper mysql 
Sql :: Split Column with delimiter into multiple columns 
Sql :: having all mysql 
Sql :: inserting values with beekeeper get error null value in column createdAt violates not-null constraint 
Sql :: What logs are available on RDS MySQL? 
Sql :: How To Execute SQL Select Statements 
Sql :: subquery postgresql syntax 
Sql :: lesser than or equal to symbol in postgres 
Sql :: convert sql to linq query online 
Sql :: PBI TO SQL 
Sql :: sql show founctions 
Sql :: mysql portable 
Sql :: first row in deluge 
Sql :: difference between cross apply and inner join 
Sql :: sql date time query find 
Sql :: difference between nvl and nvl2 in oracle 
Sql :: how to use mysql_tzinfo_to_sql on windows 
Sql :: TSQL select 50 records at a time 
Sql :: VSCode SQL Server Connection error 
Sql :: lost connection to mysql 
Sql :: get many value to 1 column sql 
Sql :: firebase sql 
Sql :: normalization in database 2nd normal form 
Sql :: multiple value select mysql 
Sql :: sql server o arquivo solicitado não pode ser baixado 
Sql :: how to find median of a column sql 
Sql :: what is sql clause 
ADD CONTENT
Topic
Content
Source link
Name
3+4 =