dotConnect for MySQL Documentation
Devart.Data.MySql Namespace / MySqlSelectStatement Class
Members Example

In This Topic
    MySqlSelectStatement Class
    In This Topic
    Represents MySQL SELECT statement.
    Syntax
    'Declaration
     
    Public NotInheritable Class MySqlSelectStatement 
       Inherits Devart.Common.SelectStatement
    public sealed class MySqlSelectStatement : Devart.Common.SelectStatement 
    Remarks
    Use MySqlSelectStatement to construct a SELECT statement in run time. The MySqlSelectStatement provides an object-oriented interface for manipulating each part of SQL SELECT statements. Use the ToString method to retrieve text of the constructed statement.
    Example
    The following example demonstrates how to use the MySqlSelectStatement class.
    MySqlSelectStatement stmt = new MySqlSelectStatement();
    
    stmt.Columns.Add(new SelectColumn("test", "td", "dname", "Department"));
    stmt.Columns.Add(new SelectColumn("", "td", "loc", "Location"));
    stmt.Columns.Add(new SelectColumn("", "te", "ename", "Name"));
    
    stmt.Tables.Add(new SelectTable("test", "dept", "td"));
    stmt.Tables.Add(new SelectTable("", "emp", "te"));
    
    stmt.GroupBy.Add(new SelectColumn("", "te", "empno", ""));
    stmt.OrderBy.Add(new SelectColumn("", "te", "ename", ""));
    Dim stmt As New MySqlSelectStatement
    
    stmt.Columns.Add(New SelectColumn("test", "td", "dname", "Department"))
    stmt.Columns.Add(New SelectColumn("", "td", "loc", "Location"))
    stmt.Columns.Add(New SelectColumn("", "te", "ename", "Name"))
    
    stmt.Tables.Add(New SelectTable("test", "dept", "td"))
    stmt.Tables.Add(New SelectTable("", "emp", "te"))
    
    stmt.GroupBy.Add(New SelectColumn("", "te", "empno", ""))
    stmt.OrderBy.Add(New SelectColumn("", "te", "ename", ""))
    Inheritance Hierarchy

    System.Object
       Devart.Common.SelectStatement
          Devart.Data.MySql.MySqlSelectStatement

    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