MainMenu

Home Java Overview Maven Tutorials

Sunday 15 January 2017

Use of SQL Update Keyword with Example

UPDATE Keyword

update keyword used to update the record in the table.

Syntax : UPDATE table_name Set column@ = value@, column$ = value$ Where column1 = value1 Example : Consider the following table Table Salary: <
Emp_idEmp_nameEmp_regEmp_salary
01chandanE_0125000
02adhirajE_0230000
03raghuE_0335000
04AlaxE_0440000

Suppose you need to update the salary of Adhiraj then

Update salary Set Emp_salary = 32000 Where Emp_name = "adhiraj" Note :Where clause is used to specify that which record in the table should be updated and if it is not used then all the record will be updated. Result: <
Emp_idEmp_nameEmp_regEmp_salary
01chandanE_0125000
02adhirajE_0232000
03raghuE_0335000
04AlaxE_0440000

Tag: SQL Update keyword with example

No comments:

Post a Comment