我在通过 C 访问 Informix 的遗留应用程序中看到以下代码片段。谁能解释代码中的 SQL 试图实现什么?谢谢。
EXEC SQL BEGIN DECLARE SECTION;
int i_tableref;
EXEC SQL END DECLARE SECTION;
/* Some code here */
if (!i_sel_ref)
{
exec sql begin declare section;
const char *sql1 =
"select refer_num.nextval from table ( SET{''} )";
exec sql end declare section;
exec sql prepare oref_sel_fid from :sql1;
if ( sqlca.sqlcode != SQL_OK )
{
/* some code */
}
/* More code */
}