public sealed class ExecuteBatchDmlRequest.Types.Statement : IMessage<ExecuteBatchDmlRequest.Types.Statement>, IEquatable<ExecuteBatchDmlRequest.Types.Statement>, IDeepCloneable<ExecuteBatchDmlRequest.Types.Statement>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Spanner v1 API class ExecuteBatchDmlRequest.Types.Statement.
It is not always possible for Cloud Spanner to infer the right SQL type
from a JSON value. For example, values of type BYTES and values
of type STRING both appear in
[params][google.spanner.v1.ExecuteBatchDmlRequest.Statement.params] as
JSON strings.
In these cases, param_types can be used to specify the exact
SQL type for some or all of the SQL statement parameters. See the
definition of [Type][google.spanner.v1.Type] for more information
about SQL types.
Parameter names and values that bind to placeholders in the DML string.
A parameter placeholder consists of the @ character followed by the
parameter name (for example, @firstName). Parameter names can contain
letters, numbers, and underscores.
Parameters can appear anywhere that a literal value is expected. The
same parameter name can be used more than once, for example:
"WHERE id > @msg_id AND id < @msg_id + 100"
It is an error to execute a SQL statement with unbound parameters.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis documentation page provides reference information for the \u003ccode\u003eExecuteBatchDmlRequest.Types.Statement\u003c/code\u003e class within the Google Cloud Spanner v1 API, specifically within the .NET environment.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eExecuteBatchDmlRequest.Types.Statement\u003c/code\u003e class represents a single DML statement that can be executed in a batch operation within Cloud Spanner and implements interfaces such as \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes properties such as \u003ccode\u003eSql\u003c/code\u003e for the DML string, \u003ccode\u003eParams\u003c/code\u003e for parameter names and values, and \u003ccode\u003eParamTypes\u003c/code\u003e to specify the SQL type for parameters when it can't be inferred, and has constructors \u003ccode\u003eStatement()\u003c/code\u003e and \u003ccode\u003eStatement(Statement)\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe page lists the available versions of the class, ranging from the latest beta version \u003ccode\u003e5.0.0-beta05\u003c/code\u003e down to \u003ccode\u003e3.5.0\u003c/code\u003e, with associated links to each version's documentation.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Spanner v1 API - Class ExecuteBatchDmlRequest.Types.Statement (5.1.0)\n\nVersion latestkeyboard_arrow_down\n\n- [5.1.0 (latest)](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [5.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/5.0.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.6.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.5.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.4.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.3.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.2.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.1.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/4.0.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [3.15.1](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.15.1/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.14.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.13.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.12.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.11.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.10.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.9.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.8.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.7.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.6.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Spanner.V1/3.5.0/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement) \n\n public sealed class ExecuteBatchDmlRequest.Types.Statement : IMessage\u003cExecuteBatchDmlRequest.Types.Statement\u003e, IEquatable\u003cExecuteBatchDmlRequest.Types.Statement\u003e, IDeepCloneable\u003cExecuteBatchDmlRequest.Types.Statement\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Spanner v1 API class ExecuteBatchDmlRequest.Types.Statement.\n\nA single DML statement. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ExecuteBatchDmlRequest.Types.Statement \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[ExecuteBatchDmlRequest](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest)[Types](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types)[Statement](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[ExecuteBatchDmlRequest](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest)[Types](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types)[Statement](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[ExecuteBatchDmlRequest](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest)[Types](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types)[Statement](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1.ExecuteBatchDmlRequest.Types.Statement), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Spanner.V1](/dotnet/docs/reference/Google.Cloud.Spanner.V1/latest/Google.Cloud.Spanner.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Spanner.V1.dll\n\nConstructors\n------------\n\n### Statement()\n\n public Statement()\n\n### Statement(Statement)\n\n public Statement(ExecuteBatchDmlRequest.Types.Statement other)\n\nProperties\n----------\n\n### ParamTypes\n\n public MapField\u003cstring, Type\u003e ParamTypes { get; }\n\nIt is not always possible for Cloud Spanner to infer the right SQL type\nfrom a JSON value. For example, values of type `BYTES` and values\nof type `STRING` both appear in\n\\[params\\]\\[google.spanner.v1.ExecuteBatchDmlRequest.Statement.params\\] as\nJSON strings.\n\nIn these cases, `param_types` can be used to specify the exact\nSQL type for some or all of the SQL statement parameters. See the\ndefinition of \\[Type\\]\\[google.spanner.v1.Type\\] for more information\nabout SQL types.\n\n### Params\n\n public Struct Params { get; set; }\n\nParameter names and values that bind to placeholders in the DML string.\n\nA parameter placeholder consists of the `@` character followed by the\nparameter name (for example, `@firstName`). Parameter names can contain\nletters, numbers, and underscores.\n\nParameters can appear anywhere that a literal value is expected. The\nsame parameter name can be used more than once, for example:\n\n`\"WHERE id \u003e @msg_id AND id \u003c @msg_id + 100\"`\n\nIt is an error to execute a SQL statement with unbound parameters.\n\n### Sql\n\n public string Sql { get; set; }\n\nRequired. The DML string."]]