O'Reilly logo

Sams Teach Yourself SQL in 24 Hours, Fifth Edition by Arie D. Jones, Ron D. Plew, Ryan Stephens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix G. Bonus Exercises

The exercises in this appendix are bonus exercises that are specific to MySQL. We provide an explanation or question and then provide sample MySQL-based SQL code to execute. Remember that the SQL code can vary from implementation to implementation, so some of these statements need to be adjusted depending on what system you are working on. Study the question, code, and results carefully to improve your knowledge of SQL.

1. Create a new database for bonus exercises and name it BONUS.

CREATE DATABASE BONUS;

2. Point MySQL to your new database.

USE BONUS;

3. Create a table to keep track of basketball teams.

CREATE TABLE TEAMS( TEAM_ID        INTEGER(2)    NOT NULL,  NAME           VARCHAR(20)   NOT ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required