SQL UpdateDecember 18, 2022 2022-12-19 0:35
This is the Employee table on which we are going to perform the update operation, where the Country column is NULL
UPDATE EMPLOYEE SET COUNTRY = 'UK'
After running the above Update query we will see that all the rows of the country column has been updated to UK.
Now if we want to Update a particular row of the above table, we will run the below query with where condition.
UPDATE EMPLOYEE SET COUNTRY = 'FR' WHERE EmployeeId = 4
In the above query we are updating a particular row of a table using the where condition. So here we have updated country column of the Employee table for EmployeeId 4 with FR.