-- (註解) (Entity SQL)

Entity SQL 查詢可以包含註解。 兩個破折號 (--) 就代表註解行的開始。

語法

-- text_of_comment

引數

text_of_comment 是包含註解文字的字元字串。

範例

以下 Entity SQL 查詢示範如何使用註解。 此查詢是根據 AdventureWorks Sales Model。 若要編譯及執行此查詢,請遵循以下步驟:

  1. 遵循 How to: Execute a Query that Returns StructuralType Results中的程序進行。

  2. 將下列查詢當成引數,傳遞至 ExecuteStructuralTypeQuery 方法:

SELECT VALUE product FROM AdventureWorksEntities.Products AS product -- add a comment here

另請參閱