Create a SQLJ procedure using the Sybase Control Center Administration Console.
- In the left pane of the Administration Console, expand, then select Stored Procedures.
- Click the drop-down arrow and select New.
You see the Create SQLJ Procedure wizard.
- On the Introduction screen, select the server, database, and owner of the new procedure.
- Enter the name of the procedure.
- Specify the external name, which identifies the Java method, class, and an optional package name.
- On the SQL Properties screen, select:
- Modifies SQL data – indicate that the Java method invokes SQL operations and modifies SQL data in the database.
- Dynamic result set – set the number of rows returned. The default number of returned rows is 1.
- Deterministic option – include the keywords deterministic or not deterministic for compatibility with the SQLJ standard. However, Adaptive Server does not make use of this option.
- On the SQL Editor screen, provide the SQL statements for the procedure. Ensure that all objects referenced by the procedure exist in the database.
- (Optional) Click Preview to see the SQL statements for your command.
- (Optional) Click Summary to verify your selected options.