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_id | Emp_name | Emp_reg | Emp_salary |
---|---|---|---|
01 | chandan | E_01 | 25000 |
02 | adhiraj | E_02 | 30000 |
03 | raghu | E_03 | 35000 |
04 | Alax | E_04 | 40000 |
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_id | Emp_name | Emp_reg | Emp_salary |
---|---|---|---|
01 | chandan | E_01 | 25000 |
02 | adhiraj | E_02 | 32000 |
03 | raghu | E_03 | 35000 |
04 | Alax | E_04 | 40000 |
No comments:
Post a Comment