# Schema Details

## Content



The ADO.NET provider for Snowflake supports schema discovery using ADO.NET classes or SQL statements to the system tables. The [GetSchema](/componentone/api/services/online-dataconnector/dotnet-standard-api/C1.AdoNet.Snowflake/C1.AdoNet.Snowflake.C1SnowflakeConnection.html#GETSCHEMA()) method can be used to retrieve the schema of the Database and DataTables.

The following code shows how the **GetSchema** method is called which returns Tables in the Database. In the second call, the method returns the columns of a specific data table.

```csharp
static void SchemaDetails()
{
    //Create and open connection
    C1SnowflakeConnection conn = new C1SnowflakeConnection(connectionString);
    conn.Open();
    //Get Schema Details:
    //Get table names
    DataTable databaseTables = conn.GetSchema("Tables");
    Console.WriteLine("List of Tables in database: \n");
    foreach (DataRow row in databaseTables.Rows)
    {
        //Display table names
        string tableName = row["TableName"].ToString();
        Console.WriteLine(tableName);
    }
    //Get column names in a table
    Console.WriteLine("Columns in table CALL_CENTER: \n");
    DataTable dtColumnsSchema = conn.GetSchema("Columns", new string[] { "CALL_CENTER" });
    foreach (DataRow crow in dtColumnsSchema.Rows)
    {
        Console.WriteLine(crow["ColumnName"].ToString() + "\t" + crow["DataType"].ToString());
    }
    //Close Connection
    conn.Close();
}
```

Similar to the **GetSchema** method, you can also use **GetSchemaTable** method of the **C1DataReader** class. The **GetSchemaTable** method returns a DataTable that defines the column metadata.