Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: List of all Oracle SQL keywords?

Re: List of all Oracle SQL keywords?

From: Karsten Farrell <kfarrell_at_belgariad.com>
Date: Fri, 11 Apr 2003 17:02:19 GMT
Message-ID: <MPG.190094f52be687c5989734@news.la.sbcglobal.net>


islaw_at_adexec.com said...
> Hello. This may seem dumb to some, but I'm wondering where I can find a
> complete list of all SQL(and PL/SQL) keywords (SELECT, FROM, IF, etc) for
> Oracle (either 8i or 9i will do.) Purpose being I'm working on a web based
> sqlplus interface and would like to add some syntax highlighting to it.
>
> For that matter what would be a good way to group the different keywords?
> Perhaps group PL/SQL-only words (IF, ELSE, CURSOR, LOOP, etc) with one color
> and Query stuff (SELECT, FROM, WHERE, ORDER/GROUP BY, HAVING, COLUMN, BREAK,
> etc) with another?
>
> Any advice will be appreciated.
> Thanks.
>
> --
> Islaw
>

In answer to your second question, I use an editor (Edit+) that allows me to color-code words. What I came up with, for both SQL and PL/SQL is to divide the reserved words into verbs, nouns, adjectives, and function names ... and assign different colors to each. Of course, strings and comments have their own colors.

However, as you'll undoubtedly discover, there is no perfect system if you only look at words and don't build a parser to determine their context. The same word can appear in SQL and PL/SQL in different contexts. And - shame on them! - some developers create tables with columns that are reserved words ... dare I admit we have tables, created before I arrived, with columns named such things as value and type?

-- 
/Karsten
DBA > retired > DBA
Received on Fri Apr 11 2003 - 12:02:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US