创建外键怎么老是提示这个错误呀 我感觉我代码没敲错啊
mysql> CREATE TABLE users(
-> id SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
-> username VARCHAR(10) NOT NULL,
-> pid SMALLINT UNSIGNED,
-> POREIGN KEY (pid) REFERENCES provinces (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 provinces (id)
)' at line 5
mysql>