Hacker News new | past | comments | ask | show | jobs | submit login

"TYPE" is a non-reserved keyword (hence the lack of an (R) in your link), it is also non-reserved in standard SQL. So it's only a keyword in some contexts, and it's generally available as an identifier.

From the wording of TFA, it probably only lists reserved keywords.

    create table type (
      type integer
    );

    insert into type (type) values (1), (2);

    select type from type;
works perfectly fine in all of sqlite, postgres, mysql, and sql server (at least according to onecompiler.com).



I see. I don’t make a distinction between reserved and keyword I guess as a matter of habit. It seems like asking for trouble.

To use the type example you provided, I’ve seen that example break syntax highlighting and ORMs where you need special quoting to make it work.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: