To modify the table structure, you need to use the ALTER TABLE command. This command also allows you to add, delete, and modify the table structure and other objects in the database.
Be careful when making schema changes, such as modifying the table structure. Dropping objects or columns causes data loss.
To use the scripts in this section, you can create a new database and table with the following scripts.
The first script creates a new database:
CREATE SCHEMA foraltering;
The next script creates a new table:
USE foraltering;
CREATE TABLE tableforaltering (
playerID varchar(9) NOT NULL,
schoolID varchar(15) NULL,
yearID smallint NULL
);
The last script inserts the following data into the new table that we just created:
USE foraltering;
INSERT INTO tableforaltering
VALUES ('aardsda01','pennst',2001),
('aardsda01',NULL...