Follow us: Subscribe via RSS Feed Connect on YouTube Connect on YouTube

Pages

Tuesday, 11 April 2017

SQL Update Table



This can be used to modify the table data.

Syntax:
     Update <table_name> set <col1> = value1, <col2> = value2 where <condition>;

Example:

     SQL> UPDATE student SET marks = 500;


     If you are not specifying any condition this will update entire table.

     SQL> UPDATE student SET marks = 500 WHERE no = 2;
     SQL> UPDATE student SET marks = 500, name = 'Venu'  WHERE no = 1;




Share this article :

0 comments:

Post a Comment