The way you include SQL statements in your application depends on the application development tool and programming interface you use.
SACommand cmd = new SACommand( "DELETE FROM Employees WHERE EmployeeID = 105", conn ); cmd.ExecuteNonQuery();
SQLExecDirect( stmt, "DELETE FROM Employees WHERE EmployeeID = 105", SQL_NTS );
stmt.executeUpdate( "DELETE FROM Employees WHERE EmployeeID = 105" );
EXEC SQL EXECUTE IMMEDIATE 'DELETE FROM Employees WHERE EmployeeID = 105';
ret = ct_command( cmd, CS_LANG_CMD, "DELETE FROM Employees WHERE EmployeeID=105" CS_NULLTERM, CS_UNUSED); ret = ct_send(cmd);
For more details about including SQL in your application, see your development tool documentation. If you are using ODBC or JDBC, consult the software development kit for those interfaces.
In many ways, stored procedures and triggers act as applications or parts of applications running inside the database server. You can also use many of the techniques here in stored procedures.
Java classes in the database can use the JDBC interface in the same way as Java applications outside the server. This section discusses some aspects of JDBC.