Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.24 KB

File metadata and controls

32 lines (24 loc) · 1.24 KB
title Performing catalog operations
description Describes how to execute commands that modify database schema.
author David-Engel
ms.author davidengel
ms.reviewer v-chmalh
ms.date 11/25/2020
ms.service sql
ms.subservice connectivity
ms.topic how-to
dev_langs
csharp

Performing catalog operations

[!INCLUDE dotnet-all]

[!INCLUDEDriver_ADONET_Download]

To execute a command to modify a database or catalog, such as the CREATE TABLE or CREATE PROCEDURE statement, create a Command object using the appropriate SQL statements and a Connection object. Execute the command with the xref:Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery%2A method of the xref:Microsoft.Data.SqlClient.SqlCommand object.

Example

The following code example creates a stored procedure in a Microsoft SQL Server database.

[!code-csharpDataWorks SqlCommand.ExecuteNonQuery#3]

See also