Answers for "sql update multiple rows"

SQL
10

how to change the value of a table in sql

UPDATE employees 
SET 
    address = '1300 Carter St',
    city = 'San Jose',
    postalcode = 95125,
    region = 'CA'
WHERE
    employeeID = 3;
Posted by: Guest on March-08-2020
1

sql run multiple updates in one query

UPDATE table_name
SET   field_name = 
      case  field_name2 
      when 'value' then 'change_to'
      when 'value2' then 'change_to2'
end
Posted by: Guest on March-25-2020
11

sql update record

UPDATE table_name
SET column1 = value1, column2 = value2...., columnN = valueN
WHERE [condition];
Posted by: Guest on June-04-2020
6

sql update record

SQL> UPDATE CUSTOMERS
SET ADDRESS = 'Pune'
WHERE ID = 6;
Posted by: Guest on June-04-2020
-1

update table sql multiple set

-- CANT do multiple sets but can do case
UPDATE table
SET ID = CASE WHEN ID = 2555 THEN 111111259 
              WHEN ID = 2724 THEN 111111261
              WHEN ID = 2021 THEN 111111263
              WHEN ID = 2017 THEN 111111264
         END
WHERE ID IN (2555,2724,2021,2017)
Posted by: Guest on April-08-2021
0

sql query update multiple columns

UPDATE table_name SET column1 = value1, column2 = value2,... 
WHERE condition;

table_name: name of the table
column1: name of first , second, third column....
value1: new value for first, second, third column....
condition: condition to select the rows for which the 
values of columns needs to be updated.
Posted by: Guest on September-28-2021

Code answers related to "sql update multiple rows"

Code answers related to "SQL"

Browse Popular Code Answers by Language