dotConnect for DB2 Documentation
Devart.Data.DB2 Namespace / DB2SelectStatement Class / DB2SelectStatement Constructor
Example

In This Topic
DB2SelectStatement Constructor
In This Topic
Creates a new instance of the DB2SelectStatement class.
Syntax
'Declaration
 
Public Function New()
 
Example
The following example demonstrates how to use the DB2SelectStatement constructor.
DB2SelectStatement stmt = new DB2SelectStatement();
stmt.Columns.Add(new SelectColumn("JOB"));
stmt.Tables.Add(new SelectTable("emp"));

stmt.Distinct = true;

//select distinct JOB from emp
string queryText = stmt.ToString();
Dim stmt As New DB2SelectStatement
stmt.Columns.Add(New SelectColumn("JOB"))
stmt.Tables.Add(New SelectTable("emp"))
stmt.Distinct = True

'select distinct JOB from emp
Dim queryText As String = stmt.ToString
See Also