= (Equals) (Entity SQL)

Compares the equality of two expressions.

expression = expression
or 
expression == expression

Arguments

  • expression
    Any valid expression. Both expressions must have implicitly convertible data types.

Result Types

true if the left expression is equal to the right expression; otherwise, false.

Remarks

The == operator is equivalent to =.

Example

The following Entity SQL query uses = comparison operator to compare the equality of two expressions. The query is based on the AdventureWorks Sales Model. To compile and run this query, follow these steps:

  1. Follow the procedure in How to: Execute a Query that Returns StructuralType Results (EntityClient).

  2. Pass the following query as an argument to the ExecuteStructuralTypeQuery method:

SELECT VALUE product FROM AdventureWorksEntities.Product 
    AS product where product.ListPrice = 125

The output is shown below:

ProductID: 842
Name: Touring-Panniers, Large
ProductNumber: PA-T100
MakeFlag: False
...

See Also

Concepts

Entity SQL Reference

Other Resources

Comparison Operators