我创建了简单的 sql 脚本并尝试在 phpMyAdmin 中执行它。它给出了错误信息:
#1064 - 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 '{ id INT, firstName VARCHAR(15), lastName VARCHAR(15), email VARCHAR(20)' at line 1
这是代码:
CREATE TABLE phoneList{id INT,
firstName VARCHAR( 15 ) ,
lastName VARCHAR( 15 ) ,
email VARCHAR( 20 ) ,
phone VARCHAR( 15 ) };