Powered by Zoomin Software. For more details please contactZoomin

DataDirect OpenAccess SDK Help

Drop Table processing

  • Last Updated: May 12, 2026
  • 1 minute read
    • OpenAccess SDK
    • Version 8.1
    • Documentation

The SQL syntax to drop a table is:

DROP TABLE table-name [drop-option];
drop-option = CASCADE | RESTRICT

When a SQL query of this form is issued, OpenAccess SDK SQL engine maps this information to a list of schema objects of type damobj_table. When the DDL function in the IP is called, the DDL function should perform the following steps:

  1. Get information about the table (name, owner, qualifier)

    pList = dam_getSchemaObjectList(hstmt, DAMOBJ_TYPE_TABLE);

    damobj_table pTableObj = getFirstSchemaObject(pList);

  2. Get foreign keys information to check the optional drop-option in the delete_rule (DAM_CASCADE | DAM_RESTRICT).

    pList = dam_getSchemaObjectList(hstmt, DAMOBJ_TYPE_FKEY);

    damobj_stat pFkeyObj = getFirstSchemaObject(pList);

  3. Use this information to drop the table.

TitleResults for “How to create a CRG?”Also Available inAlert