SQL> DESC T
名称 是否为空? 类型
----------------------------------------- -------- ---------------------------
NAME VARCHAR2(10)
SQL> SELECT * FROM T;
未选定行
#include
#include
EXEC SQL include SQLCA;
int main()
{
EXEC SQL BEGIN DECLARE SECTION;
char *sourcedb="test/test";
char name[10][10]={"A001","B002","C003","D004","E005","F006"};
int i=3;
EXEC SQL END DECLARE SECTION;
EXEC SQL DECLARE test_link DATABASE;
EXEC SQL CONNECT :sourcedb AT test_link;
EXEC SQL AT test_link FOR :i INSERT INTO T VALUES(:name);
EXEC SQL AT test_link COMMIT WORK RELEASE;
}
执行程序结果如下:
SQL> SELECT * FROM T;
NAME
--------------------
A001
B002
C003
阅读(2126) | 评论(0) | 转发(0) |