title: SQL - how to update two row table with one SQL statement
body: <p>I have this Oracle table which is used to store application settings.</p>
  
  <p><img src="https://i.stack.imgur.com/Ej4KB.png" alt="enter image description here"></p>
  
  <p>This is the SQL script that it's used to create the table:</p>
  
  <pre><code>CREATE TABLE "GLOBALSETTINGS"(
    "SettingName" Varchar2(40 ) NOT NULL,
    "SettingValue" Varchar2(40 )
  )
  /
  
  -- Add keys for table GLOBALSETTINGS
  
  ALTER TABLE "GLOBALSETTINGS" ADD CONSTRAINT "Key14" PRIMARY KEY ("SettingName")
  /
  
  ALTER TABLE "GLOBALSETTINGS" ADD CONSTRAINT "SettingName" UNIQUE ("SettingName")
  /
  </code></pre>
  
  <p>This is the SQL statement that I want to use:</p>
  
  <pre><code>UPDATE GLOBALSETTINGS
  SET settingValue =
    CASE
      WHEN settingName = 'SessionTTL'
      THEN '30'
      WHEN settingName = 'MaxUsersActive'
      THEN '40'
      ELSE settingValue
    END
  WHERE settingName IN ('SessionTTL', 'MaxUsersActive');
  </code></pre>
  
  <p>But When I run it in SQL developer I get this error message:</p>
  
  <pre><code>Error starting at line 1 in command:
  UPDATE GLOBALSETTINGS 
     SET settingValue = case 
                          when settingName = 'SessionTTL'  then '30' 
                          when settingName = 'MaxUsersActive'  then '40' 
                          else settingValue
                        end
  WHERE settingName in ('SessionTTL', 'MaxUsersActive')
  Error at Command Line:7 Column:6
  Error report:
  SQL Error: ORA-00904: "SETTINGNAME": invalid identifier
  00904. 00000 -  "%s: invalid identifier"
  *Cause:    
  *Action:
  </code></pre>
  
  <p>How I can fix the problem?</p>
  
  <p>Best wishes
  Peter</p>