Sql.Net Class Library Documentation

UpdateQuery Class

Encapsulates a SQL UPDATE statement

For a list of all members of this type, see UpdateQuery Members.


public class UpdateQuery

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.


Use UpdateQuery to update data in a database table. Set TableName to the table you would like to update, populate the Terms collection with column-value pairs and define which rows should be affected using the WhereClause.


UpdateQuery query = new UpdateQuery("products");
query.Terms.Add(new UpdateTerm("price", SqlExpression.Number(12.1)));
query.Terms.Add(new UpdateTerm("quantaty", SqlExpression.Field("quantaty")));
query.WhereClause.Terms.Add(WhereTerm.CreateCompare(SqlExpression.Field("productId"), SqlExpression.Number(1), CompareOperator.Equal) );


Namespace: Reeb.SqlOM

Assembly: Reeb.SqlOM (in Reeb.SqlOM.dll)

See Also

UpdateQuery Members | Reeb.SqlOM Namespace