3 ms·
"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
by masklinn 3y ago
"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).
- user3939382 3y agoI 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.