#docslug#/ecob/ecob/V1.1.6/overview-1
The embedded SQL statements supported by OceanBase Embedded SQL in C (ECOB) include all standard SQL statements and some extended SQL statements. The extended SQL statements are used between the host application and OBServer to deliver data.
The following code shows the syntax of the embedded SQL statement used by ECOB. Note that EXEC SQL must be added before the statement.
EXEC SQL <standard SQL statement>|<extension SQL statement>
For more information about the syntax of the standard SQL statements, see OceanBase Database SQL Reference (Oracle mode). For more information, see SQL statements. The following table lists extended SQL statements supported by ECOB V1.1.0. The following topics describe the extended SQL statements supported by ECOB and special SQL statements of ECOB.
| Type | Statement | Description |
|---|---|---|
| Connection creation | CONNECT | Creates a connection to an OceanBase Database instance. |
| Basic SQL statements | SELECT | Executes a query and assigns the query result to the external host variables. |
| Basic SQL statements | INSERT | Executes an insert statement. |
| Basic SQL statements | UPDATE | Synchronizes the values of external variables to table columns of OceanBase Database or updates the column where the cursor is located. |
| Basic SQL statements | DELETE | Deletes one or more rows of data in OceanBase Database or deletes the column where the cursor is located. |
| Basic SQL statements | COMMIT | Commits a transaction. You can specify whether to release resources and disconnect the database connection. |
| Basic SQL statements | ROLLBACK | Rolls back a transaction.You can specify whether to release resources and disconnect the database connection. |
| Prepared statements | PREPARE | Precompiles an SQL statement in PS mode. |
| Prepared statements | EXECUTE | Executes the precompiled SQL statement. |
| Stored procedures | CALL | Calls stored procedures. |
| Cursor | DECLARE CURSOR | Defines a cursor variable. In ECOB V1.1.0, the cursor variable only supports queries. |
| Cursor | OPEN | Opens a cursor variable. |
| Cursor | FETCH | Fetches the result set stored by the cursor variable. |
| Cursor | CLOSE | Closes a cursor variable. |
| Simple dynamic SQL statement | EXECUTE IMMEDIATE | Executes a dynamic SQL string. |
| ANSI dynamic SQL statements | ALLOCATE DESCRIPTOR | Allocates the SQL description area. |
| ANSI dynamic SQL statements | DEALLOCATE DESCRIPTOR | Releases the SQL description area. |
| ANSI dynamic SQL statements | DESCRIBE INPUT DESCRIPTOR | Binds variable information. |
| ANSI dynamic SQL statements | DESCRIBE OUTPUT DESCRIPTOR | Gets the information of the output column. |
| ANSI dynamic SQL statements | GET DESCRIPTOR | Gets the item information of the SQL description area. |
| ANSI dynamic SQL statements | SET DESCRIPTOR | Sets the item information of the SQL description area. |
| ANSI dynamic SQL statements | OPEN USING DESCRIPTOR | Opens the cursor variable in an ANSI dynamic SQL statement. |
| ANSI dynamic SQL statements | FETCH INTO DESCRIPTOR | Uses the dynamic statement descriptor to get the result set stored by the cursor variable. |