October 2002
Beginner
864 pages
18h 41m
English
The exercises in this appendix are bonus walk-through exercises. We provide an explanation or question, and then provide the SQL code that you need to type at the mysql> prompt. Please study the question, code, and results carefully to improve your knowledge of SQL.
Invoke MySQL and create a new database for bonus exercises.
CREATE DATABASE BONUS;
Point MySQL to your new database.
USE BONUS;
Create a table to keep track of basketball teams.
CREATE TABLE TEAMS ( TEAM_ID INTEGER(2) NOT NULL, NAME VARCHAR(20) NOT NULL );
Create a table to keep track of basketball players.
CREATE TABLE PLAYERS ( PLAYER_ID INTEGER(2) NOT NULL, LAST VARCHAR(20) NOT NULL, FIRST VARCHAR(20) NOT NULL, TEAM_ID INTEGER(2) NULL, NUMBER INTEGER(2) ...
Read now
Unlock full access