i have table and the table have many records , now i want to edit data in one column in the row not all the row columns
what is the statement to update some columns not all !!
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted May 28, 2012, 11:35 AM EDT
The UPDATE statement is used to update records in a table.
The UPDATE Statement
The UPDATE statement is used to update existing records in a table.
SQL UPDATE Syntax
SET column1=value, column2=value2,...
WHERE some_column=some_value
Note: Notice the WHERE clause in the UPDATE syntax. The WHERE clause specifies which record or records that should be updated. If you omit the WHERE clause, all records will be updated!
SQL UPDATE Example
The "Persons" table:
Now we want to update the person "Tjessem, Jakob" in the "Persons" table.
We use the following SQL statement:
SET Address='Nissestien 67', City='Sandnes'
WHERE LastName='Tjessem' AND FirstName='Jakob'
The "Persons" table will now look like this:
SQL UPDATE Warning
Be careful when updating records. If we had omitted the WHERE clause in the example above, like this:
SET Address='Nissestien 67', City='Sandnes'
The "Persons" table would have looked like this:
Please refer the below link
http://www.w3schools.com/sql/sql_update.asp
Thanks
Anil KumarRank #367 · 6.8K reputationPosted May 28, 2012, 11:04 AM EDT
UPDATE myTableName
SET myUpdateRequiredColName = newValue
WHERE