PG Certificate Course in Data Science, AI & Machine Learning by IIT Roorkee. Apply Now & Get up to Rs. 75,000 OFF! Offer Ends in:

  Apply Now

SQL Tutorial

20 / 68

Updating data in a table

Values of one or more columns of a table can be updated with the 'update' command to store new required values.


update table_name SET field1 = new-value1, field2 = new-value2
[where Clause]


update deptt
set depcity = 'Pune' where depstreet = 'Laker Street';
update deptt
set depopendate = STR_TO_DATE('20170610','%Y%m%d'), depstreet = 'Saker Street' where depcity = 'Mumbai' order by depid desc limit 1;
select * from deptt ;

No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...