Jay Rohrssen Jay Rohrssen - 1 month ago 5
SQL Question

What does this symbol mean ::=?

I'm reading Joe Celko's book SQL for Smarties, and he uses some notation that's unfamiliar to me. After an internet search, I found some small bits of info about it on Oracle's site.

The symbol he's using that I don't understand is this ::=

My searches turned up very little info, but what I did find was part of a railroad diagram. Here's a link to the one document I found that contains the symbol:


Here is one example from the book to describe what I'm talking about:

< schema element > ::=
< domain definition > | < table definition > | < view definition >
| < grant statement > | < assertion definition > | < character set definition >
| < collation definition > | < translation definition >

What does the ::= mean?


This symbol is from Backus-Naur Form (BNF) which is used for syntax description. It is used to separate the name of non-terminal symbol on the left from its definition on the right.

You can read ::= as "is defined as":

schema element is defined as a domain definition or a table definition or a view definition or ...