by user3939382 · 3y ago · 0 comments
MySQL's SQL is the only language I use where I regularly trip on reserved keywords, super annoying. Not sure off the top of my head if there's some better design to fix that short of namespacing every reserved keyword. In some cases you can do `` to get around it but better to avoid them altogether.
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).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.
Can you tell me: what kind of identifier is it (view name, function name) and which SQL context it causes problems (select list, create/drop statement, ...) and which system has problems with it. Thx.