EXPERT RESPONSE
The simple answer is no. The reason it's not possible
is because database tables don't have fields, just rows and
columns. Columns are not contained in fields.
Perhaps you meant "Is it possible to update a specific
column in a row without changing the
value of the other columns in the same row?"
The answer then is yes. Regardless of the number
of columns defined for the table, you have complete control
over exactly how many values you update.
Example of updating a specific column in a specific
row without changing anything else:
UPDATE personnel
SET salary = salary * 1.10
WHERE emp_id = 937
In the above example, only one column value (salary)
is being updated, for only one employee (937).
Example of updating a specific column in multiple
rows without changing any other column values:
UPDATE personnel
SET salary = salary * 1.05
WHERE job_code = 4
In this example, only one column value (salary)
is being updated, but this value is updated for all employees
which have a job code of 4. Again, no other columns are
updated.
|