No special syntax:

CREATE TABLE your_table (some_id int, your_column varchar(100));

INSERT INTO your_table VALUES (1, 'Hello');

UPDATE your_table
SET    your_column = NULL
WHERE  some_id = 1;

SELECT * FROM your_table WHERE your_column IS NULL;
+---------+-------------+
| some_id | your_column |
+---------+-------------+
|       1 | NULL        |
+---------+-------------+
1 row in set (0.00 sec)
Answer from Daniel Vassallo on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › sql › how-to-set-a-column-value-to-null-in-sql
How to Set a Column Value to Null in SQL? - GeeksforGeeks
You can set a column value to NULL using the SQL UPDATE statement. Through the UPDATE statement, existing records in a table can be changed.
Published   July 23, 2025
🌐
W3Schools
w3schools.com › sql › sql_null_values.asp
SQL NULL Values - IS NULL and IS NOT NULL
SQL Examples SQL Editor SQL Quiz SQL Exercises SQL Server SQL Syllabus SQL Study Plan SQL Bootcamp SQL Certificate SQL Training ... If a field in a table is optional, it is possible to insert or update a record without adding any value to this field. This way, the field will be saved with a NULL value.
🌐
Atlassian
atlassian.com › data › sql › how-to-replace-nulls-with-0s
How to replace nulls with 0s in SQL
Null Values can be replaced in SQL by using UPDATE, SET, and WHERE to search a column in a table for nulls and replace them.
Top answer
1 of 4
1

You can SET multiple fields by delimiting each with a comma. You'll just need to specify the record based on some unique pattern, in this case c1 and yryryryr.

UPDATE #Rentarious
SET   power1 = 'Red'
    , power2 = 'Blue'
    , power3 = 'Green'
WHERE   c1       = 'Build Blocks'
    AND yryryryr = '2012';
2 of 4
6

What would the syntax be to write an update statement to update the null values for fields power1, power2, power3 with the values already listed in the table?

I take this to mean that each company's nulls should be populated based on the values taken from the one populated entry that, as you say elsewhere in your post, each company has. So, in pseudo-code, your UPDATE statement would need to look something like this:

UPDATE
  #Rentarious
SET
  power1 = power1 from the same company’s populated row,
  power2 = power2 from the same company’s populated row,
  power3 = power3 from the same company’s populated row
WHERE power1 IS NULL
  AND power2 IS NULL
  AND power3 IS NULL
;

One way to implement the above pattern could be to use correlated subqueries:

UPDATE
  #Rentarious
SET
  power1 = (SELECT power1 FROM #Rentarious AS src WHERE src.c1 = #Rentarious.c1 AND src.power1 IS NOT NULL),
  power2 = (SELECT power2 FROM #Rentarious AS src WHERE src.c1 = #Rentarious.c1 AND src.power2 IS NOT NULL),
  power3 = (SELECT power3 FROM #Rentarious AS src WHERE src.c1 = #Rentarious.c1 AND src.power3 IS NOT NULL)
WHERE power1 IS NULL
  AND power2 IS NULL
  AND power3 IS NULL
;

While that would work, such an update might not be very efficient, because the same table would be touched three extra times to obtain the source value. Since you know that the non-null values are stored in one row for each company, you could obtain them all in just one extra pass over the table by using a derived table and the proprietary "update with a join" syntax:

UPDATE
  #Rentarious
SET
  power1 = sub.power1,
  power2 = sub.power2,
  power3 = sub.power3
FROM
  (
    SELECT
      c1,
      power1,
      power2,
      power3
    FROM
      #Rentarious
    WHERE power1 IS NOT NULL
      AND power2 IS NOT NULL
      AND power3 IS NOT NULL
  ) AS sub
WHERE #Rentarious.c1 = sub.c1
  AND #Rentarious.power1 IS NULL
  AND #Rentarious.power2 IS NULL
  AND #Rentarious.power3 IS NULL
;

You can also rewrite it to use the explicit JOIN syntax:

UPDATE
  tgt
SET
  power1 = src.power1,
  power2 = src.power2,
  power3 = src.power3
FROM
  #Rentarious AS tgt
  INNER JOIN
  (
    SELECT
      c1,
      power1,
      power2,
      power3
    FROM
      #Rentarious
    WHERE power1 IS NOT NULL
      AND power2 IS NOT NULL
      AND power3 IS NOT NULL
  ) AS sub
  ON tgt.c1 = sub.c1
WHERE tgt.power1 IS NULL
  AND tgt.power2 IS NULL
  AND tgt.power3 IS NULL
;

As you can see, there is only one subquery in both variations and it provides all three values to populate the other rows.

Note, though, that it is also possible to solve this problem without any extra scans. First of all, if this were a SELECT statement, you could return the populated row's values in every row by using a window aggregate function, like this:

SELECT
  c1,
  yryryryr,
  power1,
  power2,
  power3,
  populatedPower1 = MAX(power1) OVER (PARTITION BY c1),
  populatedPower2 = MAX(power2) OVER (PARTITION BY c1),
  populatedPower3 = MAX(power3) OVER (PARTITION BY c1)
FROM
  #Rentarious
;

The MAX function works in this situation because it returns the maximum value only across the non-null values in the specified set. In your case, there would be only one non-null value per partition of c1 in each of the three cases, so the function would return that one value. This would be the result of the query for the example in your question:

c1               yryryryr    power1  power2  power3  populatedPower1  populatedPower2  populatedPower3
---------------  ----------  ------  ------  ------  ---------------  ---------------  ---------------
Building Blocks  2012-01-01  NULL    NULL    NULL    Red              Blue             Green
Building Blocks  2013-01-01  NULL    NULL    NULL    Red              Blue             Green
Building Blocks  2014-01-01  NULL    NULL    NULL    Red              Blue             Green
Building Blocks  2016-01-01  Red     Blue    Green   Red              Blue             Green
Red Cement       2012-01-01  Pink    Purple  Orange  Pink             Purple           Orange
Red Cement       2016-01-01  NULL    NULL    NULL    Pink             Purple           Orange
Red Cement       2011-01-01  NULL    NULL    NULL    Pink             Purple           Orange

So the only thing remaining would be just to

SET
  power1 = populatedPower1,
  power2 = populatedPower2,
  power3 = populatedPower3

And it is indeed possible to do so in SQL Server, because the result of the above SELECT query can be used as the target of your UPDATE statement. You can use it as a derived table:

UPDATE
  tgt
SET
  power1 = populatedPower1,
  power2 = populatedPower2,
  power3 = populatedPower3
FROM
  (
    SELECT
      c1,
      yryryryr,
      power1,
      power2,
      power3,
      populatedPower1 = MAX(power1) OVER (PARTITION BY c1),
      populatedPower2 = MAX(power2) OVER (PARTITION BY c1),
      populatedPower3 = MAX(power3) OVER (PARTITION BY c1)
    FROM
      #Rentarious
  ) AS tgt
WHERE power1 IS NULL
  AND power2 IS NULL
  AND power3 IS NULL
;

or implement it as a CTE (Common Table Expression) and use the CTE's alias as the target:

WITH tgt AS
  (
    SELECT
      c1,
      yryryryr,
      power1,
      power2,
      power3,
      populatedPower1 = MAX(power1) OVER (PARTITION BY c1),
      populatedPower2 = MAX(power2) OVER (PARTITION BY c1),
      populatedPower3 = MAX(power3) OVER (PARTITION BY c1)
    FROM
      #Rentarious
  )
UPDATE
  tgt
SET
  power1 = populatedPower1,
  power2 = populatedPower2,
  power3 = populatedPower3
WHERE power1 IS NULL
  AND power2 IS NULL
  AND power3 IS NULL
;

Both would work equally well and result in all nulls replaced with corresponding values, i.e. from this:

c1               yryryryr    power1  power2  power3
---------------  ----------  ------  ------  ------
Building Blocks  2016-01-01  Red     Blue    Green
Red Cement       2012-01-01  Pink    Purple  Orange
Building Blocks  2012-01-01  NULL    NULL    NULL
Building Blocks  2013-01-01  NULL    NULL    NULL
Building Blocks  2014-01-01  NULL    NULL    NULL
Red Cement       2016-01-01  NULL    NULL    NULL
Red Cement       2011-01-01  NULL    NULL    NULL

to this:

c1               yryryryr    power1  power2  power3
---------------  ----------  ------  ------  ------
Building Blocks  2016-01-01  Red     Blue    Green
Red Cement       2012-01-01  Pink    Purple  Orange
Building Blocks  2012-01-01  Red     Blue    Green
Building Blocks  2013-01-01  Red     Blue    Green
Building Blocks  2014-01-01  Red     Blue    Green
Red Cement       2016-01-01  Pink    Purple  Orange
Red Cement       2011-01-01  Pink    Purple  Orange
🌐
Teradata
docs.teradata.com › r › Enterprise_IntelliFlex_VMware › SQL-Data-Manipulation-Language › Statement-Syntax › UPDATE › UPDATE-Examples › Example-UPDATE-to-Set-a-Null-Value
Example: UPDATE to Set a Null Value - Teradata Vantage
Loading application · Promo placeholder · Tracking Consent Teradata.com · Developers · Getting Started · VantageCloud Lake Documentation AI Unlimited All Documentation · Downloads · Community · Teradata Community Technical Medium Blogs Github Stack Overflow · Try for free
🌐
Plus2Net
plus2net.com › sql_tutorial › sql-null-value.php
NULL value data managing by INSERT, UPDATE and Delete SQL commands
SQL dump of student3 table → · SELECT * FROM`student3` WHERE class IS NULL This will display all the records which have NULL value for class column. Similarly we can display all the records which do not have null value for the class.
🌐
Tutorialspoint
tutorialspoint.com › home › sql › sql null values
Understanding SQL NULL Values
November 29, 2009 - The above query would produce the ... in SQL. To do so, you can use the IS NULL operator in your WHERE clause to filter the rows containing NULL values and then set the new value using the SET keyword....
Find elsewhere
🌐
YouTube
youtube.com › watch
SQL server tutorial: How to update column with null value in sql? - YouTube
How to update column with null value in sql ?Subscribe to @programmingforeverybodyhttps://www.youtube.com/@programmingforeverybody/?sub_confirmation=1Videos ...
Published   August 17, 2023
🌐
Stack Overflow
stackoverflow.com › questions › 37132999 › sql-query-for-update-a-record-with-null-values
sql server - SQL Query for update a record with null values - Stack Overflow
Rephrase the question please and tell us WHY do you want it and what is wrong with updating the columns explicitly. ... then you can simply delete that record and insert a new row with only one column value ( Delete from table where id=1 , Insert ...
🌐
Sybase
infocenter.sybase.com › help › topic › com.sybase.infocenter.dc32300.1570 › html › sqlug › sqlug261.htm
Changing a column’s value to NULL
Adaptive Server Enterprise 15.7 ... columns · Chapter 7: Adding, Changing, Transferring, and Deleting Data · To set a column value to NULL, use the update statement:...
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 306867 › how-to-update-colum-serial-where-is-null-by-max-1
How to update colum serial where is null by max+1 ? - Microsoft Q&A
I work on SQL server 2012 I face issue i can't update column serial by max + 1 where is have null value on on serial column partnumber is unique on table so i need to get max number from serial and increment it by 1 then assign it to null on…
🌐
TutorialsPoint
tutorialspoint.com › how-to-set-a-column-value-to-null-in-sql
How to Set a Column Value to Null in SQL?
Setting a Column Value to Null To set a column value to NULL, use the SQL UPDATE statement, which allows modification of existing records in a table. The basic syntax for setting a column value to NULL is − Syntax UPDATE table_name SET column_name =