Now, Here I want to make some changes in third and fourth row, to complete this action, I execute UPDATE command with INNER JOIN. You can see how Third and Fourth records of table schoolold easily replaced with table schoolnew by using INNER JOIN with UPDATE statement.update t1 -- just reference table alias here set t1.somevalue = t2.somevalue from table1 t1 -- these rows will be the targets inner join table1 t2 -- these rows will be used as source on ..................There are essentially two methods for adding records to a table.
I usually need to document what I did, so I use the "results to Text" option when I run the rollbacked query and I save both the script and the result of the OUTPUT.
(Of course this is not practical if I changed too many rows) Thank you for your interest in this question.
Then I created a new table named with schoolnew and similarly executed above actions on it.
Then, to view inserted records in it, I execute SELECT command.
To modify the data that is currently in a table, you use the UPDATE statement, which is commonly referred to as an update query.