Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (55.6k points)

Can anyone tell me how to update the table in SQL?

1 Answer

0 votes
by (119k points)

We can use the UPDATE statement to update or modify the data of the table. Here is the syntax to use UPDATE statement in SQL:

UPDATE TableName
SET column_1 = value_1, column2_ = value_2, ...
WHERE condition(s);

Here is the example of how to change the name of the employee in the table where ever the id is ‘797’

UPDATE Employee
SET ContactName = ‘Praveen’ , City= 'Frankfurt'
WHERE CustomerID = ‘797’;

If you are interested in SQL, then check out this SQL training course by Intellipaat that provides instructor-led training and hands-on experience with exercises and project work.

Related questions

Browse Categories

...