How to Update Query in SQL

Описание к видео How to Update Query in SQL

The Best Online Bookstore: https://amzn.to/4hlEMZp

Follow this step by step easy tutorial to learn how to use Update query in SQL together with where clause.

Don't forget to check out our site http://howtech.tv/ for more free how-to videos!
   / ithowtovids   - our feed
  / howtechtv   - join us on facebook
https://plus.google.com/1034403827176... - our group in Google+

An Update query in SQL is used to modify the present records in the existing table.
A "Where" clause has to be used with the Update query to specify the row which has to be modified, otherwise all the rows in the table will get effected.

Step 1- Displaying Employee Table
First of all, let us fetch all records from the table and after that we will update the table by Update query of SQL.
For that simply write:
Select * from EMP

Step 2-Update Query
Now , if we want to update the salary for Jones, first we will use Update keyword along with the particular table name which is EMP in our case, then we have to specify its employee Number in the where clause.
Together the query in SQL would be something like this:
Update EMP
Set Sal=3500
Where EMPNO=7566
Execute it by pressing F5.

Step 3-Done with Update
Now fetch the data from employee table again and see that that salary of Employee No. 7566 has been updated to the amount specified earlier in Update query of SQL

And this is how we can use Update query in SQL.

Комментарии

Информация по комментариям в разработке