While creating a table in Mariadb with this code
CREATE TABLE classes(
ClassID SMALLINT UNSIGNED PRIMARY,
Grade TINYINT UNSIGNED,
Subject VARCHAR(20),
YearTaught YEAR
);
I got this error.
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' Grade TINYINT UNSIGNED, Subject VARCHAR(20), YearTaught YEAR )' at line 2
And I don't know what's wrong with the syntax. Thank you.
ClassID SMALLINT UNSIGNED PRIMARY KEYAlso, names are case-insensitive, it is more common to use snake case instead of camel case. year_taught instead of YearTaught