描述语言语法的这种语言的名称是什么?

时间:2010-05-21 09:07:09

标签: terminology

例如:

<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 > ] 

是什么语言?

4 个答案:

答案 0 :(得分:4)

答案 1 :(得分:1)

这不是一种语言,而是BNF(Backus-Naur Form)中语法的正式描述(在本例中为SQL select语句)。

答案 2 :(得分:0)

由于您提供的示例使用“可选”括号[...],因此它实际上是Extended Backus Naur Form

答案 3 :(得分:0)

这看起来有点像SQL的一部分的BNF定义。