Roc Ho
Roc Ho

Reputation: 305

What's the name of this language that describes a language syntax?

for example:

<SELECT statement> ::=  
    [WITH <common_table_expression> [,...n]]
    <query_expression> 
    [ ORDER BY { order_by_expression | column_position [ ASC | DESC ] } 
  [ ,...n ] ] 
    [ COMPUTE 
  { { AVG | COUNT | MAX | MIN | SUM } ( expression ) } [ ,...n ] 
  [ BY expression [ ,...n ] ] 
    ] 
    [ <FOR Clause>] 
    [ OPTION ( <query_hint> [ ,...n ] ) ] 
<query_expression> ::= 
    { <query_specification> | ( <query_expression> ) } 
    [  { UNION [ ALL ] | EXCEPT | INTERSECT }
        <query_specification> | ( <query_expression> ) [...n ] ] 
<query_specification> ::= 
SELECT [ ALL | DISTINCT ] 
    [TOP expression [PERCENT] [ WITH TIES ] ] 
    < select_list > 
    [ INTO new_table ] 
    [ FROM { <table_source> } [ ,...n ] ] 
    [ WHERE <search_condition> ] 
    [ <GROUP BY> ] 
    [ HAVING < search_condition > ] 

whats the language called?

Upvotes: 2

Views: 122

Answers (4)

High Performance Mark
High Performance Mark

Reputation: 78306

That looks a bit like a BNF definition of part of SQL.

Upvotes: 0

Oded
Oded

Reputation: 498904

This is not a language, but a formal description of syntax (in this case for SQL select statements) in BNF (Backus-Naur Form).

Upvotes: 1

aioobe
aioobe

Reputation: 420921

Since the example you provide uses "optional" brackets [...] it is actually Extended Backus Naur Form.

Upvotes: 0

pmr
pmr

Reputation: 59811

It's the Backus-Naur Form, actually the Extended Backus-Naur Form.

Upvotes: 4

Related Questions