Syntax error with create table in postgresql (Build a Menu for Bytes of China project)

Hi guys,
I’m working on “Build a Menu for Bytes of China” and past question 5 the following code:

create table restaurant (
id integer primary key,
name varchar(20),
description varchar(100),
rating decimal,
telephone char(10),
hours varchar(100),

throws up this message “ERROR: syntax error at or near “name”. LINE 4: name varchar(20),”
Any help would be great

I’m not sure what’s throwing the error at that point, there’s an extra comma on the final column though. If that’s not good enough try removing lines and adding them back in to try and hunt down which one is throwing your error. If there was a copy paste perhaps there’s an unexpected character in there somewhere.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.