mysql> CREATE TABLE province(
-> pname VARCHAR(20) NOT NULL,
-> id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT
-> );
Query OK, 0 rows affected (0.04 sec)
mysql> CREATE TABLE user(
-> id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
-> uname VARCHAR(20) NOT NULL,
-> pid SMALLINT UNSIGNED,
-> FOREING KEY (pid) REFERENCES province (id)
-> );
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY (pid) REFERENCES province (id)
)' at line 5