Search Results for

    Show / Hide Table of Contents

    Class Table

    Represents a server Table or View.

    Inheritance
    System.Object
    DatabaseObject
    Table
    Namespace: MySqlX.XDevAPI.Relational
    Assembly: MySql.Data.dll
    Version: 9.3.0
    Syntax
    public class Table : DatabaseObject

    Properties

    IsView

    Gets a value indicating whether the object is a View (True) or a Table (False).

    Declaration
    public bool IsView { get; }
    Property Value
    Type Description
    System.Boolean

    Methods

    Count()

    Returns the number of rows in the table on the server.

    Declaration
    public long Count()
    Returns
    Type Description
    System.Int64

    The number of rows.

    Delete()

    Creates a TableDeleteStatement. This method is intended to delete rows from a table.

    Declaration
    public TableDeleteStatement Delete()
    Returns
    Type Description
    TableDeleteStatement

    A TableDeleteStatement object for delete chain operations.

    ExistsInDatabase()

    Verifies if the table exists in the database.

    Declaration
    public override bool ExistsInDatabase()
    Returns
    Type Description
    System.Boolean

    true if the table exists; otherwise, false.

    Overrides
    DatabaseObject.ExistsInDatabase()

    Insert(String[])

    Creates a TableInsertStatement set with the fileds to insert to. The table insert statement can be further modified before exeuction. This method is intended to insert one or multiple rows into a table.

    Declaration
    public TableInsertStatement Insert(params string[] fields)
    Parameters
    Type Name Description
    System.String[] fields

    The list of fields to insert.

    Returns
    Type Description
    TableInsertStatement

    A TableInsertStatement object for insert chain operations.

    Select(String[])

    Creates a TableSelectStatement set with the columns to select. The table select statement can be further modified before execution. This method is intended to select a set of table rows.

    Declaration
    public TableSelectStatement Select(params string[] columns)
    Parameters
    Type Name Description
    System.String[] columns

    The optional column names to select.

    Returns
    Type Description
    TableSelectStatement

    A TableSelectStatement object for select chain operations.

    Update()

    Creates a TableUpdateStatement. This method is intended to update table rows values.

    Declaration
    public TableUpdateStatement Update()
    Returns
    Type Description
    TableUpdateStatement

    A TableUpdateStatement object for update chain operations.

    In This Article
    • Properties
      • IsView
    • Methods
      • Count()
      • Delete()
      • ExistsInDatabase()
      • Insert(String[])
      • Select(String[])
      • Update()
    Back to top Copyright © 2021, 2025, Oracle and/or its affiliates.