Repair the Sample Database


Scheduled EventsEvent outlinesBooksWhitepapersWebinarsArticlesContact UsRick F van der Lans

 

 

 

[Home][Books][Introduction to SQL][Repair Sample Database]

 

 


Repair the Example Database

 

Due to the execution of SQL statements, such as INSERT, UPDATE, and DELETE, it can happen that the contents of the database will deviate from the original situation. These changes will have a direct impact on the results of other statements. Therefore, it is required to restore the database to its original content occasionally.

There are two ways:

  1. If only the contents of the example database has changed, download the file called IntroSQL_V4_restore_rows_example_database.txt. First execute a USE statement to log on to the correct database (this is probably a database called TENNIS). Then, execute the statements in the downloaded file using WinSQL. First, DELETE statements will be used to remove the existing rows,  followed by INSERT statements to restore the original tables.
  2. If you have also changed the structure of the tables by, for example, adding a column, then the tables should be dropped and recreated. Download the file IntroSQL_V4_restore_structure_example_database.txt, and execute the statements using WinSQL.

[Previous][Up]

Copyright (c) 2017 R20/Consultancy B.V.. All rights reserved.