Updating all the data in a table 

You can run an UPDATE statement without a WHERE clause. However, be very careful when doing this since it can be time-consuming on a large table. If you accidentally update all the rows, it could break the reporting or application functionality that relies on the values as they were before you changed them. 

You can update the managerscopy table since it is a copy of the managers table and it won't do any harm to update a column to all the same values:

USE lahmansbaseballdb;
UPDATE managerscopy
SET lgID = '--';

The previous query updates all the lgID rows to '--', as you can see in the following screenshot: 

If you need to set this back to the original values, you can carry out an update from an existing table. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.216.249