I’m trying to create a table in workbench, and I don’t know why theses names can be set up. It ask me to change it. Maybe it concern features that I would like to disable.
create table net_shows( title VARCHAR(100) ,rating VARCHAR(100) ,ratingLevel VARCHAR(100) ,ratingDescription INT(10) ,release year INT(4) ,user rating score FLOAT(4) ,user rating size FLOAT(4) );
release , user appear in blue like a special command.
Advertisement
Answer
A column name is an identifier, and those can’t include unless it’s a delimited identifier (sometimes called quoted identifier.) Also reserved words need to be delimited. (en.wikipedia.org/wiki/SQL_reserved_words.) In MySQL you use back-ticks to delimit an identifier.