Coding task · SQL and MySQL course · Module 4: Creating tables (DDL)

A shelf with special types

Use DATE, BOOLEAN and ENUM to describe a book copy.

Task

Write a CREATE TABLE statement that creates the egzemplarze table with columns: id of type INT with AUTO_INCREMENT and PRIMARY KEY, data_zakupu of type DATE, dostepna of type BOOLEAN with a default value of TRUE, and stan of type ENUM('nowy','uzywany','zniszczony').