Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 1.26 KB

perform-catalog-operations.md

File metadata and controls

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

Performing catalog operations

[!INCLUDEappliesto-netfx-netcore-netst-md]

[!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