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

SelectColumn Class
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
 
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
SqlSelectStatement statement = new SqlSelectStatement();

// 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 SqlSelectStatement = New SqlSelectStatement()

' 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