Share via


Table Object

Cette fonctionnalité sera supprimée dans une prochaine version de Microsoft SQL Server. Évitez d'utiliser cette fonctionnalité dans de nouveaux travaux de développement et prévoyez de modifier les applications qui utilisent actuellement cette fonctionnalité.

The Table object exposes the attributes of a single Microsoft SQL Server table.

Modèle objet SQL-DMO qui affiche l'objet en cours

Methods

Notes

SQL Server Table objects contain columns that define a table, and row data that populate it. Table columns can maintain declarative referential integrity constraints, such as PRIMARY KEY and FOREIGN KEY. Indexes defined on table columns can enforce a UNIQUE constraint or can provide optimized row access. Tables participate in SQL Server user-based security.

With the Table object, you can:

  • Create a SQL Server table.

  • Change an existing SQL Server table by adding or dropping columns.

  • Export data from, or import data to, an existing SQL Server table.

  • Establish optimal data-access paths by adding, dropping, and rebuilding table indexes.

  • Enforce business rules by adding or modifying table triggers executed when data is added or updated within the table.

  • Generate a Transact-SQL script to re-create an existing SQL Server table.

  • Remove a table from a SQL Server database.

The Name property of a Table object uses the SQL Server data type sysname. If a server running SQL Server uses quoted identifiers, the Name property string can contain spaces. The value of the Nameproperty is unique for tables with a specific owner within a specific database.

Notes

The Table object is compatible with instances of SQL Server versions 7.0 and later. However, the Table2 object extends the functionality of the Table object for use with features that were introduced in SQL Server 2000.

Voir aussi

Référence