Allows Embedded SQL programs to release memory allocated to a particular thread.
exec sql thread_exit;
exec sql include sqlca;
main()
{
...
for (;;)
{
/* A thread connects to Adaptive Server Enterprise,
** executes various embedded SQL statements,
** and then disconnects from
** Adaptive Server Enterprise
*/
...
exec sql thread_exit;
...
}
/* The exit statement must be the last
** embedded SQL statement in the program.
*/
exec sql exit;
} /* end of main */
The thread exit statement deallocates all memory resources allocated to a particular thread.
The thread exit statement is a Sybase extension; it is not defined in the SQL standard.
exit