First page Back Continue Last page Image

/* Create and load a table that contains a list

of organizations in Seattle that assist

people in finding jobs

*/

-- Select the database we want to modify

USE dataExamples;

-- New table so if another one with this name exists

DROP TABLE IF EXISTS `organization`;

CREATE TABLE `organization` (

-- Let us have the database provide a unique key

`orgID` INT(5) AUTO_INCREMENT,

...

Here is the top of one of my SQL scripts that creates a new table

It is not uncommon for developers to grab existing code like this and copy it as a way to make another new table

But if the name I select for my new table already exists in the database -- perhaps created by another developer -- and I use this without checking first, I destroy their data

Systematic Table Destruction