Update Command - SQL..........


Update Command :-


             This command is used update existing record (s) in a table.

Syntax:

update <table_name> set <column1_name>=<value1>,

<column2_name>=<value2>, …..

 where <condition> ;

Ex:

update employee_table set

emp_name=’Santhoshi Sridhar’ where emp_id < 249;

 

Note:-

  If we not specify where clause in update statement are records will be update.

Ex:

update employee_table set

emp_name=’Santhoshi Sridhar’;

 

Whenever we execute the above statement all records emp_name will be ‘Santhoshi Sridhar’.