USE waterloo;
DROP TABLE IF EXISTS waterloo;
CREATE TABLE waterloo
(
id int unsigned NOT NULL auto_increment, # Unique ID for the record
building varchar(255) NOT NULL, # Name of building
floor int unsigned NOT NULL, # Floor of building
gender varchar(255) NOT NULL, # Gender of bathroom
location int unsigned NOT NULL, # Convenience of location of bathroom
cleanliness int unsigned NOT NULL, # Cleanliness of bathroom
stalls int unsigned NOT NULL, # Number of stalls
noise int unsigned NOT NULL, # Ambient noise
lines int unsigned NOT NULL, # Length of lines at peak hours
graffiti int unsigned NOT NULL, # Amount of graffiti on the walls
PRIMARY KEY (id)
);
我收到以下错误:
ERROR 1064 (42000):您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 11 行的 'lines int unsigned NOT NULL, graffiti int unsigned NOT NULL )' 附近使用正确的语法