About 257,000 results
Open links in new tab
  1. sql - update columns values with column of another table based …

    Nov 17, 2009 · According to the script you are actually updating the field in the table you are querying rather than the one you are updating. The SET clause should reference the UPDATE …

  2. sql - Update multiple values in a single statement - Stack Overflow

    Nov 14, 2008 · Depending on which database you are using, if that doesn't work, then try this (this is non-standard SQL but legal in SQL Server): Update M Set TotalX = Sum(D.X), TotalY = …

  3. sql - Update table column values based on conditional logic

    I need an update query to update the salary column depending on the values it contains. Salaries need to increase by: 5000 for values between 10000 to 15000 ; 7000 for values between …

  4. Update values from one column in same table to another in SQL …

    I'm trying to overwrite values that are found in TYPE1 with values that are found in TYPE2. I wrote this SQL to try it out, but for some reason it isn't updating: select * from stuff update stuf...

  5. SQL UPDATE WHERE IN (List) or UPDATE each individually?

    Oct 19, 2015 · My answer uses the case keyword, and applies to when you are trying to run an update for a list of key-value pairs (not when you are trying to update a bunch of rows to a …

  6. Remove Trailing Spaces and Update in Columns in SQL Server

    Update : 2022. I had answered this question 7 years ago(in 2015). At that time there was not a direct function for trimming in SQL server. But from SQL Server 2017, they introduced the …

  7. SQL UPDATE SET one column to be equal to a value in a related …

    Often in a query like this, you need to qualify the WHERE clause with an EXISTS clause that contains the sub-query. This prevents the UPDATE from trampling over rows where there is …

  8. Update a single column on multiple rows with one SQL query

    You could use the MERGE statement which is in the SQL:2003 standard and available in Transact-SQL since SQL Server 2008:

  9. sql - UPDATE statement with multiple WHERE conditions - Stack …

    Jul 1, 2013 · Update all values in Table1 with this single query: UPDATE Table1 INNER JOIN tmp ON Table1.[Acct Numb] LIKE tmp.[Acct Numb] SET Table1.Ticker = tmp.NewTicker; Yes, the …

  10. SQL - Update multiple records in one query - Stack Overflow

    I have table - config. Schema: config_name | config_value And I would like to update multiple records in one query. I try like that: UPDATE config SET t1.config_value = 'value' , t2.config_va...

Refresh