Right-click your new Project in the Project window, and select New -> Object Type Definition from the popup menu.
The New Object Type Definition Wizard appears.
In Step 1 of the wizard, select the wizard type. In this case, select Oracle Database as the wizard type. Click Next.
In Step 2 of the wizard, specify the database connection information.
The connection information fields are:
Once you have entered the correct information in the connection fields, click Next.
In Step 3 of the wizard, select the types of database object you want to include in your project
For this example, select the following:
In Step 4 of the wizard, select the table for the project. Click Add. The Add Tables dialog box appears.
From the Add Tables dialog box, search for or enter the name of the database. For this example, use the DB_EMPLOYEE table. When the database appears in the Results selection frame, click Select, and click OK to close the Add Table dialog box.
Click Next. The wizard proceeds to Step 6, Add Prepared Statements. Click Add.
The Add Prepared Statement dialog box appears.
In the Add Prepared Statements dialog box, enter Select_ps as the Prepared Statement Name, and enter the following as the SQL Statement:
select * from db_employee where emp_no > ? order by emp_no
In this example, the SQL statement includes the ? placeholder for input. This placeholder represents the Where Clause.
Click OK to close the Add Prepared Statement dialog box, and then click Next.
In Step 7 of the wizard, enter a name for the OTD. In this example, use otdOracle. Click Next.
In Step 8 of the wizard, review your settings, then click Finish to create the OTD.