on 2020 Feb 06 8:04 AM
Hi,
I thought DESCRIPTION is a reserved word. That would explain why it is colored in Interactive SQL to indicate that it is a keyword.
However, it looks that it is not a reserved keyword because the following only returns 'desc': select * from sa_reserved_words() where reserved_word like '%desc%'
So why do you think this is?
(Using SQL Anywhere 17)
"desc" is reserved but "description" is what we call a "keyword/identifier". That is, "description" could be used as an identifier in some contexts and as a keyword (ie, reserved word that is part of SQL syntax) in other contexts. Wherever possible, we don't create new truly reserved words because we don't want to break any existing SQL statements, stored procedures, etc by reserving a word that someone might already be using as a variable name, table name, column name, etc. sa_reserved_words() only returns strings that can never be used as identifiers and are always reserved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK then... if one accepts the usefulness of color highlighting (I don't), the highlighting of these words is justified because in most cases the words load, unload, etcetera, will be used as keywords rather than identifiers.
Having said that... if ISQL can't parse SQL (apparently it can't) then it shouldn't pretend that it can... computers aren't supposed to make mistakes, not even some of the time, so when ISQL gets the highlighting wrong it loses credibility.
Actually, out of curiosity I dug a bit deeper. A long time ago (1999), one could create event 'types' along with a description for a scheduled event though I don't know if we ever shipped that. It might have been a work in progress.
create_event_type: T_CREATE event_type
event_type: T_EVENT T_TYPE identifier T_DESCRIPTION T_STRING
So there was a statement of the form
CREATE EVENT TYPE foo DESCRIPTION 'do stuff'
The ability to manage a distinct set of event types (probably in a system table) and have associated descriptions seems to have been removed and the event type is specified when you create the event (sans description).
User | Count |
---|---|
68 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.