8

It seems, that Stack Overflow doesn't recognise the SQL:2003/SQL:2008 MERGE statement, as can be seen in my answer here:

Oracle: Updating a table column using ROWNUM in conjunction with ORDER BY clause

or here:

merge into table_a u
using (select id, rownum rnum from table_a order by column1, column2) s
on (u.id = s.id)
when matched then update set u.sequence_column = s.rnum

these keywords are not recognised: merge, using, matched

I'm not sure if this is a bug or a feature request.

UPDATE: I was asked to look for some more keywords. I can confirm, these standard ones are not recognised either:

partition
rows
unbounded
preceding
following
row

And these Oracle-specific ones might be interesting too http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/ap_keywd.htm

ACCESS, AUDIT, CHAR, CLUSTER, COMMENT, COMPRESS, CONNECT, DATE, DECIMAL, EXCLUSIVE, 
FLOAT, IDENTIFIED, IMMEDIATE, INCREMENT, INITIAL, INTEGER, LEVEL, LOCK, LONG, 
MAXEXTENTS, MINUS, MLSLABEL, MODE, MODIFY, NOAUDIT, NOCOMPRESS, NOWAIT, NUMBER, 
OFFLINE, ONLINE, PCTFREE, PRIOR, PRIVILEGES, RAW, RENAME, RESOURCE, ROW, ROWID, 
ROWNUM, ROWS, SESSION, SHARE, SIZE, SMALLINT, START, SUCCESSFUL, SYNONYM, SYSDATE, 
UID, VALIDATE, VARCHAR, VARCHAR2, WHENEVER
asked May 23, 2011 at 7:48
0

2 Answers 2

6

Yup, it looks like you're right, even with explicitly specifying a language hint, those keywords are still not highlighted in the appropriate colors. (View the source of my edit to the original question for details.)

However, Stack Overflow's syntax highlighting is powered by Google's Code Prettify. It is a separate project from Stack Overflow, and maintained independently by a mostly-different set of folks.

You'll need to report this one to Google as a bug and wait for them to fix it, or submit a patch yourself. Once it's fixed in Prettify, the latest version can be deployed by the team across the network and everything will be peachy-keen.

answered May 23, 2011 at 8:01
1
  • Thanks for the hint. I've filed a bug report to the news group. I guess the rest will be more or less automatic for peachy-keen-ness ;-) Commented May 23, 2011 at 8:27
5

Added missing SQL keywords at revision 202 of prettify. New release is forthcoming shortly.

answered Mar 30, 2012 at 15:24
0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.