Presentation is loading. Please wait.

Presentation is loading. Please wait.

Trainer: Bach Ngoc Toan– TEDU Website:

Similar presentations


Presentation on theme: "Trainer: Bach Ngoc Toan– TEDU Website:"— Presentation transcript:

1 Trainer: Bach Ngoc Toan– TEDU Website: http://tedu.com.vn
Lesson 21 SQL UPDATE Trainer: Bach Ngoc Toan– TEDU Website:

2 SQL UPDATE The SQL commands (UPDATE and DELETE) are used to modify the data that is already in the database. SQL UPDATE statement is used to change the data of the records held by tables. Which rows is to be update, it is decided by a condition. To specify condition, we use WHERE clause. UPDATE table_name SET [column_name1= value1,... colu mn_nameN = valueN] [WHERE condition]  

3 Updating Multiple Fields
UPDATE students   SET User_Name = 'beserious', First_Name = 'Johnny'   WHERE Student_Id = '3'  

4 SQL UPDATE WITH SELECT QUERY
UPDATE tableDestination   SET tableDestination.col = value   WHERE EXISTS (   SELECT col2.value   FROM  tblSource   WHERE tblSource.join_col = tblDestination. Join_col   AND  tblSource.Constraint = value)  


Download ppt "Trainer: Bach Ngoc Toan– TEDU Website:"

Similar presentations


Ads by Google