Represents a column or an expression in SELECT, GROUP BY and ORDER BY clauses of a SQL statement.
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
MySqlSelectStatement statement = new MySqlSelectStatement();
// 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 MySqlSelectStatement = New MySqlSelectStatement()
' 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", ""))