About 438,000 results
Open links in new tab
  1. How can I do an UPDATE statement with JOIN in SQL Server?

    This was an example, but the point is as Eric said in How can I do an UPDATE statement with JOIN in SQL Server?. You need to add an UPDATE statement at first with the full address of all tables to join …

  2. sql - update one table with data from another - Stack Overflow

    I'll like to add: for Postgresql, the syntax is slightly different update a set field1 = concat_ws(' ',field1, table2.middle_name, table2.first_name) from table2 where a.id = table2.fieldX; Just added some …

  3. sql server - Update multiple columns in SQL - Stack Overflow

    Jan 31, 2012 · 26 The Update table1 set (a,b,c) = (select x,y,x) syntax is an example of the use of row-value constructors, Oracle supports this, MSSQL does not. (Connect item)

  4. sql - SAP HANA update with join - Stack Overflow

    Oct 20, 2022 · UPDATE TABX AS a SET b.att1 = 'XXX', b.att2 = 'ZZZ' LEFT JOIN TABZ AS b ON a.att3 = b.att3 WHERE a.att4 LIKE 'YYY' AND att5 = 'PPP' AND is_valid = 'TRUE' According to the Post on …

  5. sql - Update statement using with clause - Stack Overflow

    ) update t set SomeColumn = c.ComputedValue from mytable t inner join comp c on t.id = c.id The real thing has quite a few with clauses that all reference each other, so any suggestions actually using …

  6. SQL Server after update trigger - Stack Overflow

    IF UPDATE(Country) BEGIN SET @field = 'Updated Country' END INSERT INTO CustomerLogs VALUES(@Id, @field) // OR -- If you wish to update existing table records. UPDATE YOUR_TABLE …

  7. Update query using Subquery in Sql Server - Stack Overflow

    Update query using Subquery in Sql Server Asked 12 years, 10 months ago Modified 5 years, 10 months ago Viewed 440k times

  8. Solutions for INSERT OR UPDATE on SQL Server - Stack Overflow

    Sep 20, 2008 · Similar questions: * Insert Update stored proc on SQL Server * SQL Server 2005 implementation of MySQL REPLACE INTO?

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

    I have a master / detail table and want to update some summary values in the master table against the detail table. I know I can update them like this: update MasterTbl set TotalX = (select sum(X...

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

    Oct 19, 2015 · UPDATE table1 SET somecolumn = 'someVal' WHERE ID IN (SELECT ID FROM @definedTable); In the above, @definedTable is a SQL 'User Defined Table Type', where the data …