Question: Every time I try to run the create.sql file I have, it says there is a syntax error near "buy\_price". The rest of the tables work fine, though.

```
create table Item (itemID string PRIMARY KEY, 
    name string, 
    currently string, 
    buy_price string, 
    first_bid string, 
    started string, 
    ends string, 
    userID string references User, 
    description string, 
    constraint ch_buy_price check buy_price >= first_bid,
    constraint );

```

Any help would be appreciated.

Answer: 
The check constraint needs to be enclosed in parentheses:

```
create table item 
(
  itemid        string primary key,
  name          string,
  currently_    string,
  buy_price     string,
  first_bid     string,
  started       string,
  ends          string,
  userid        string references user,
  description   string,
  constraint chk_buy_price check (buy_price >= first_bid) --<< here
);

```

You also have an additional `constraint` at the end which needs to be removed.
You are getting the error because you can not refer first\_bid(table column) in check constraint(**Column check constraint cannot reference other column**).If you want to have a check for this use triggers.