0

enter image description here

I have a field in a table called "usage". (I did not create it) In a query in SQLDeveloper the word "usage" is highlighted as if it is a keyword (like "Select")

Is "usage" a keyword is SQL? (or Oracle) If yes, what does it do? If no, why is it highlighted?

You can understand how difficult it has been to search for any information on this. Putting the word usage on any search returns results about to use stuff :-(

Thanks Paul Mc

Paul McCarthy
  • 818
  • 9
  • 24
  • 1
    [I don't see anything here (keywords & reserved words)](https://docs.oracle.com/cd/B10501_01/appdev.920/a42525/apb.htm), [or here](https://docs.oracle.com/cd/B19306_01/appdev.102/b14261/reservewords.htm) listing `usage` as a keyword. – Siyual Dec 19 '16 at 16:32
  • What do you mean by "highlighted" - simply the color used in the editor? Or it being underlined with a wavy line (like the word "select" in thatjeffsmith's answer, on the left side of the screenshot? –  Dec 19 '16 at 18:07

3 Answers3

2

It's an identifier, not a keyword. SQL Developer allows you to highlight them independently.

enter image description here

thatjeffsmith
  • 20,522
  • 6
  • 37
  • 120
  • I've added an image to my question so people can see what I am on about. The field "usage" is not highlighted the same as other fields. – Paul McCarthy Dec 20 '16 at 10:22
  • my answer would be correct if indeed it was used as listed originally, "usage" would be a quoted identifier :) in this context it's a keyword but not a reserved word – thatjeffsmith Dec 21 '16 at 13:39
2

One example I know is

ALTER INDEX indexname MONITORING USAGE

See documentation

Marcin Wroblewski
  • 3,491
  • 18
  • 27
1

According to the

Oracle documentation and the PostgreSQL documentation

it's indeed a keyword, and an ANSI keyword to boot. As to its usage (pun intended), I've got no idea.

UPDATE

According to this SQL grammar by Jonathan Leffler (I guess this is the same Jonathan Leffler, but I'm not 100% sure), it's a GRANTable privilege.

At least in MySQL, this privilege seems to be used to indicate the absence of privileges.

Community
  • 1
  • 1
Frank Schmitt
  • 30,195
  • 12
  • 73
  • 107