dotConnect for DB2 Documentation
Devart.Common Namespace / SelectColumn Class
Members Example

In This Topic
    SelectColumn Class
    In This Topic
    Represents a column or an expression in SELECT, GROUP BY and ORDER BY clauses of a SQL statement.
    Syntax
    'Declaration
     
    Public NotInheritable Class SelectColumn 
       Inherits SelectStatementNode
    public sealed class SelectColumn : SelectStatementNode 
    Example

    This example shows how SelectColumns can be used to create a SelectStatement object representing the following query:

    SELECT test.dept.dname Department, test.dept.loc Location
        FROM test.dept
    
    DB2SelectStatement statement = new DB2SelectStatement();
    
    // Create columns. Specify their schema, tables to which they belong, their names and aliases.
    SelectColumn cName = new SelectColumn("test", "dept", "dname", "Department");
    SelectColumn cLoc = new SelectColumn("test", "dept", "loc", "Location");
    
    statement.Columns.Add(cName);
    statement.Columns.Add(cLoc);
    
    statement.Tables.Add(new SelectTable("test", "dept", ""));
    Dim statement As DB2SelectStatement = New DB2SelectStatement()
    
    ' Create columns. Specify their schema, tables to which they belong, their names and aliases.
    Dim cName = New SelectColumn("test", "dept", "dname", "Department")
    Dim cLoc = New SelectColumn("test", "dept", "loc", "Location")
    
    statement.Columns.Add(cName)
    statement.Columns.Add(cLoc)
    
    statement.Tables.Add(New SelectTable("test", "dept", ""))
    Inheritance Hierarchy

    System.Object
       Devart.Common.SelectStatementNode
          Devart.Common.SelectColumn

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also